Subject: Re: [xsl] generating conditional comment in html output From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx> Date: Wed, 09 Feb 2011 14:35:56 -0500 |
I have a stylesheet which has been turning XML into HTML without batting an eyelid but somebody has requested that the output HTML contain some conditional styling. This means that at one point in the output I have to insert the string
<!--[if gte IE 7]>
and at another point I have to insert the string
<![endif]-->
I've tried using < in <xsl:text>, using <xsl:value-of> a variable, using d-o-e, and none of these options seems to work. They either display the conditional comment in the browser with < and > (and an editor shows the literal string "& l t ;" in the HTML) or without, or I get errors telling me I have malformed code. I'm processing with Saxon in XSL2, and rendering with IE7 and IE8.
What is the proper way to do this please? I found many potential answers in the FAQ but I haven't found one that works :-(
-- Contact us for world-wide XML consulting & instructor-led training Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/ G. Ken Holman mailto:gkholman@xxxxxxxxxxxxxxxxxxxx Legal business disclaimers: http://www.CraneSoftwrights.com/legal
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] generating conditional co, Imsieke, Gerrit, le- | Thread | RE: [xsl] generating conditional co, Trevor Nicholls |
Re: [xsl] generating conditional co, Imsieke, Gerrit, le- | Date | [xsl] Testing for value of a preced, Charles Muller |
Month |