[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: HOWTO: Internet Explorer conditional comments in X

Subject: RE: HOWTO: Internet Explorer conditional comments in XSLT 1.0
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Mon, 31 Oct 2005 20:10:10 -0000
internet explorer conditional comments
I'm not sure you emphasize strongly enough the key limitation in this
approach: in the data model, comments cannot contains elements, they can
only contain strings; so you need to construct your content as a string in
which the markup is hand-generated. If the stuff between IE's conditional
comments gets complicated then this is going to become a pain, especially if
you have to produce it by modifying existing stylesheets that were designed
to produce the content as real element trees.

The stuff on result-tree-fragments is a bit tangential. The content could
just as well be a string. There's no special RTF "magic" here. All that's
happening is that when a string contains the "<" character, and the string
is used to form the body of a comment, the "<" is left as a "<" and isn't
escaped to "&lt;".

Incidentally, you also have to worry about the fact that the comment can't
contain "--" (and therefore, can't contain nested comments).

Michael Kay 
http://www.saxonica.com/


> -----Original Message-----
> From: Nick Fitzsimons [mailto:nick@xxxxxxxxxxxxxx] 
> Sent: 31 October 2005 18:34
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject:  HOWTO: Internet Explorer conditional comments 
> in XSLT 1.0
> 
> Hi all,
> 
> With the forthcoming arrival of Internet Explorer 7, Microsoft are
> exhorting people[1] to use IE's conditional comments[2] to 
> apply their CSS
> hacks.
> 
> It seems from comments at Dave Shea's Mezzoblue[3] that some 
> people have
> had trouble generating conditional comments using XSLT, so 
> I've written up
> how to do it:
> <http://www.nickfitz.co.uk/2005/10/27/ie-conditional-comments-
> in-xslt-10/>
> 
> I hope this isn't considered OT, but it occurred to me that 
> there must be
> people subscribing to the list who have faced this problem, 
> so I thought
> it might help. Feel free to castigate me and correct my 
> mistakes, whether
> through my comments form or via email.
> 
> Regards,
> 
> Nick.
> 
> [1]<http://blogs.msdn.com/ie/archive/2005/10/12/480242.aspx>
> [2]<http://msdn.microsoft.com/library/default.asp?url=/worksho
> p/author/dhtml/overview/ccomment_ovw.asp>
> [3]<http://www.mezzoblue.com/archives/2005/10/13/bye_bye_tan_/
> #c012563>
> 
> 
> -- 
> Nick Fitzsimons
> http://www.nickfitz.co.uk/

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.