[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: "Nick Fitzsimons" <nick@xxxxxxxxxxxxxx>
Date: Tue, 1 Nov 2005 08:57:01 -0000 (GMT)
howto internet
> 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/

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.