You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by co...@kent.pnn.police.uk on 2002/11/15 15:43:07 UTC
More elegant way to determine browser? Can this be done?
Hi,
Having looked at the example for determine which browser is requesting a
resource and pulling in the appropriate stylesheet, it occurred to me
could this be done any easier.
The examples given is such ....
<map:select type="browser">
<!-- you could insert parameters here as well -->
<map:when test="explorer">
<map:transform src="stylesheets/w3c-2-msie.xsl"/>
</map:when>
<map:when test="lynx">
<map:transform src="stylesheets/dynamic-page2html-text.xsl"/>
<map:serialize/>
</map:when>
<map:when test="netscape">
<map:transform src="stylesheets/ns4.xsl"/>
</map:when>
<map:otherwise>
<map:transform src="stylesheets/w3c.xsl"/>
</map:otherwise>
</map:select>
could you do something else like this **** (pseudo code) ****
<map:transform>
<map:src>
stylesheets/dynamic<map:select type="browser" />.xsl
</map:src>
</map:transform>
to concatenate the value returned by the map:select statement to your
stylesheet names???????
and name your stylesheets
dynamicexplorer.xsl
dynamiclynx.xsl
dynamicnetscape.xsl
Just an idea - has anyone done anything similar as I don't what to have
to do these multiple select statements for all of my website. Lazy I
know.
TIA
Conrad
etc. etc.
Conrad Crampton J
Software Solutions
Kent Police
FHQ
11 Edinburgh Square
Sutton Road
Maidstone
Kent
ME15 9BZ
(01622 652869
19 2869
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>