Re: xsl:comment problem
Thomas Comiotto <[email protected]> Fri, 9 Mar 2007 19:34:43 +0100
| Newsgroups | gmane.comp.mozilla.devel.layout.xslt |
|---|---|
| Message-ID | <[email protected]> |
> First of all, why are you doing this? The > > <style> > <!-- > ... > --> > </style> I'm writing an firefox editor extension that renders an xhtml view by (re)using xml2xhtml stylesheets provided by a content server (e.g. cocoon). As it turns out my app has to deal with this case because it's what people do at the server side and they want to reuse their stuff. > construct was invented to make browsers that didn't support > stylesheets not display the stylesheet as text. However to my > knowledge there are no browsers that support XSLT but does not > support stylesheets. > See above. > Second, comments in the DOM are always ignored. Even inside > stylesheets and scripts. The reason that the above construct works > in HTML is that the contents of the <style> tag is not actually > markup, but rather always treated as text. If you look at the DOM > you'll see that there is not a comment, but rather a textnode, > inside the style element. > > If you try the above in XHTML you'll find that the comment is > ignored. Same thing if you insert a comment in a HTML document > using the DOM. I don't get you point. Regards, Thomas