Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


RE: [xsl] HOWTO: Internet Explorer conditional comments in XSLT 1.0

From: "Nick Fitzsimons" <nick@-------------->
To:
Date: 11/1/2005 9:02:00 AM
> 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.
>

Yes, it's true that the approach could be messy for anything too complex.
I probably didn't emphasise enough that I was thinking of this primarily
in the context of generating a straightforward <link> as in the example,
as that seems to address the original problem of applying CSS hacks in a
clean manner.

> 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;".
>

Good point; I'll have to rework that bit. Thanks :-)

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

To be honest, I haven't ever experimented with including comments inside a
conditional comment; I wonder if it would break...

Thanks for your comments; I'll update the article to reflect these points
(as soon as I get some time free from work).

Cheers,

Nick.

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

-- 
Nick Fitzsimons
http://www.nickfitz.co.uk/


transparent
Print
Mail
Digg
delicious
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent