This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: XSL special chars output prob.
- From: Mike Brown <mike at skew dot org>
- To: xsl-list at lists dot mulberrytech dot com
- Date: Tue, 11 Jun 2002 12:05:34 -0600 (MDT)
- Subject: Re: [xsl] XSL special chars output prob.
- Reply-to: xsl-list at lists dot mulberrytech dot com
CAO Tuan Dung wrote:
> And i have an additinal question. How to output character special as
> '<', '>', '/'
> in the value of text. as valueof select = "...."
No need to escape '/' or '>', but you can use '>' for '>' if it
makes things easier to edit.
<xsl:value-of select="'1 & 2 are both < 3, but > 0'" />
<xsl:copy-of select="path/to/some/nodes[. div $foo < 2] />
A trick for including a string-delimiting quote:
<xsl:variable name="q">'</xsl:variable>
<xsl:value-of select="concat('don',$q,'t tread on me.')"/>
- Mike
____________________________________________________________________________
mike j. brown | xml/xslt: http://skew.org/xml/
denver/boulder, colorado, usa | resume: http://skew.org/~mike/resume/
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list