xsl-list
[Top] [All Lists]

Re: IE's conditional comments in xslt

2006-03-04 07:27:23
Yeah, I do understand why you have implemented this, but it seems to
me you are not gaining anything by using if conditional.  None of the
other browsers see the IE specific conditional in the first place, so
why test the system property at all.  If you are going to go the
system-property route then visit http://www.jenitennison.com/ , click
the index.xml link in the upper left hand corner, and view the source
to locate the URI to the stylesheet, you can then access this
styelsheet and see how she has elequently used the extended system
property info made available as part of the MSXML processor to
determined browser version.  Doing both an IE specific condtional that
none of the browsers pay attention to anyway, suggests that

<xsl:if test="system-property('xsl:vendor')='Microsoft'">
...
</xsl:if>

Is not even necessary, unless you combine this with the extended
version information that can be accessed to determine which script to
use.

HTH!


On 3/4/06, Manfred Staudinger <manfred(_dot_)staudinger(_at_)gmail(_dot_)com> 
wrote:
Sorry David, forgot about the system-property,  so your example would
then look like:

<xsl:if test="system-property('xsl:vendor')='Microsoft'">
        <xsl:comment><![CDATA[[if IE]><![if lt IE 
7]><![endif]]]></xsl:comment>
         <script src="/scripts/ie5.js" type="text/javascript">//*
 imported via src attribute *//</script>
         <style type="text/css">
           @import "/browser/ie5/base.css";
         </style>
        <xsl:comment><![CDATA[[if IE]><![endif]><![endif]]]></xsl:comment>
</xsl:if>

Manfred

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: 
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--




--
<M:D/>

M. David Peterson
http://www.xsltblog.com/
<Prev in Thread] Current Thread [Next in Thread>