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 "<".
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(_at_)nickfitz(_dot_)co(_dot_)uk]
Sent: 31 October 2005 18:34
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: [xsl] 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/
--~------------------------------------------------------------------
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>
--~--
--~------------------------------------------------------------------
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>
--~--