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

generating conditional comment in html output

Subject: generating conditional comment in html output
From: "Trevor Nicholls" <trevor@xxxxxxxxxxxxxxxxxx>
Date: Thu, 10 Feb 2011 08:17:29 +1300
 generating conditional comment in html output
Hi

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 &lt; 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 :-(

Cheers
T

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.