Subject: RE: [xsl] HOWTO: Internet Explorer conditional comments in XSLT 1.0 From: "Michael Kay" <mike@xxxxxxxxxxxx> Date: Mon, 31 Oct 2005 20:10:10 -0000 |
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@xxxxxxxxxxxxxx] > Sent: 31 October 2005 18:34 > To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx > 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/
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] HOWTO: Internet Explorer , Jon Gorman | Thread | [xsl] Splitting data into smaller g, Mike Rumble |
RE: [xsl] Idea to relax default ns , Michael Kay | Date | RE: [xsl] Splitting data into small, Michael Kay |
Month |