[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
[Recent Entries]
[Reply To This Message]
Re: IE's conditional comments in xslt
Subject: Re: IE's conditional comments in xslt
From: "M. David Peterson" <m.david@xxxxxxxxxx>
Date: Sat, 04 Mar 2006 15:01:18 -0700
|
This came out completely off the mark: > The code I originally posted
will hide the code from IE7, but show it to all down-level browsers,
including Fx, etc... (its just seen as a comment.) That looks (obviously
:) like:.
Obviously (I hope! :) this should have suggested that the code will be
hidden from IE7. but IE6 will see it just fine, as will IE 5.5 and 5.0
(I believe, need to check the docs to be certain which conditional
syntax would allow these browsers to see it as well). But in any other
browse it will simply be seen as a comment.
Setting this portion aside, I am now intrigued to hear about what it is
you are attempting, and how you are proposing to solve this. I think I
originally assumed too much as to what it seemed to be you were trying
to solve.
M. David Peterson wrote:
Manfred Staudinger wrote:
On 04/03/06, M. David Peterson <xmlhacker@xxxxxxxxx> wrote:
You haven't fully got it yet:
I guess not. What is that you are trying to output? Or, better said,
what browser are you trying to hide from? The original code you
showed had a bunch of escaped entities so I didnt tear into to deeply.
I seem to remember you stating something to the effect if not doing
browser sniffing. Client or Server? and why? I'm sure your reason
is valid, just curious as to why the concern. The code I originally
posted will hide the code from IE7, but show it to all down-level
browsers, including Fx, etc... (its just seen as a comment.) That
looks (obviously :) like:.
<!--[if lt IE 7]>
<script src="foo.js" type="text/javascript"></script>
<![endif]-->
None of the other browsers see the IE specific conditional in the
first place,
This is true only for downlevel-hidden CC's, but you have to see that
the only thing I hide from other browsers is that one
downlevel-revealed CC.
For example, the content between these two lines
<xsl:comment><![CDATA[[if IE]><![if IE 7]><![endif]]]></xsl:comment>
and
<xsl:comment><![CDATA[[if IE]><![endif]><![endif]]]></xsl:comment>
is perfectly visible for all non-IE browsers plus IE 7!
Okay. Still not sure as to what it is you are trying to hide and what
you are trying to show. Maybe this will help me understand the
purpose for all of this?
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.
No, she determines the version of MSXML, not the browser version.
Ahh... okay... Its been a while since I've looked at her code... need
to go back and check it out again and refresh my memory what she is
looking for. Possibly for MSXML2? I'll look again. Thanks for the
correction!
Its an interesting site implementation, thanks for the link anyway.
Sure.
Manfred
Current Thread |
Message not available
|
|
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format
RSS 2.0 |
|
Atom 0.3 |
|
|