[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: avoiding disable-output-escaping, how to output M$

Subject: Re: avoiding disable-output-escaping, how to output M$ wierd syntax
From: iwantto keepanon <iwanttokeepanon@xxxxxxxx>
Date: Wed, 31 Aug 2005 21:59:01 +0400 (MSD)
output.m
Jon Gorman writes:

> Ummm, since this comment is a "comment" you can certainly code it like
> any other comment.  (If that makes any sense)
>
> Even though it makes me quesy, it should be possible to write this
> just as a comment.
>
>>    <xsl:text disable-output-escaping="yes"><!--[if IE]></xsl:text>
>>    <link rel="stylesheet" type="text/css" href="/~rodney/times/css/ieonly.css" media="screen" />
>>    <xsl:text disable-output-escaping="yes"><![endif]--></xsl:text>
>
> as the comment that it really desires to be should just be:
>
>  <xsl:comment>[if IE]><link rel="stylesheet" type="text/css"
> href="/~rodney/times/css/ieonly.css" media="screen"
> /><![endif]</xsl:comment>


Well, the link element gets parsed as a node and the comment output
does not have any link in it.  It (xsltproc) also tries to parse
"<![endif]" and pukes on the ! in the element name.  It would also
puke if it ever got to the missing >.  But a little modification give
this:

   <xsl:comment><![CDATA[[if IE]><link rel="stylesheet" type="text/css" href="/~rodney/times/css/ieonly.css" media="screen" /><![endif]]]></xsl:comment>

which does produce the same output.  But I'm not sure this is better
markup than using "disable-output-escaping".  Specifically, if I had
to use variables inside the CDATA section; I'd be up a creek.

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.