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

Re: < in <xsl:eval>

Subject: Re: < in <xsl:eval>
From: Keith Visco <kvisco@xxxxxxxxx>
Date: Wed, 16 Dec 1998 13:11:59 -0500
xsl eval
you can escape the scripting with a CDATA section as well

<xsl:eval><![CDATA[
var i=0;var sString="";for(i=0;i<10;i++){sString += ".";};sString;
]]></xsl:eval>

Chris Maden wrote:
> 
> [alan dennis]
> > How can you test for < in an eval statement, in IE5?  For instance
> > the following works:
> >
> > <xsl:eval>var i=0;var sString="";for(i=0;10>i;i++){sString += ".";}
> > ;sString;</xsl:eval>
> >
> > however
> >
> > <xsl:eval>var i=0;var sString="";for(i=0;i<10;i++){sString += ".";}
> > ;sString;</xsl:eval>
> >
> > (which is of the more common form) does not.
> 
> Your XSL stylesheet is an XML document, and subject to all the
> strictures thereof.  You must encode < as &lt;, or else it is not a
> legal XML document.  The XML parser will interpret the entity
> reference before passing the data to the stylesheet engine, so the
> comparison should evaluate correctly.
> 
> -Chris
> --
> <!NOTATION SGML.Geek PUBLIC "-//Anonymous//NOTATION SGML Geek//EN">
> <!ENTITY crism PUBLIC "-//O'Reilly//NONSGML Christopher R. Maden//EN"
> "<URL>http://www.oreilly.com/people/staff/crism/ <TEL>+1.617.499.7487
> <USMAIL>90 Sherman Street, Cambridge, MA 02140 USA" NDATA SGML.Geek>
> 
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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.