This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: XSL special chars output prob.


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 '&gt;' for '>' if it
makes things easier to edit.

  <xsl:value-of select="'1 &amp; 2 are both &lt; 3, but > 0'" />
  <xsl:copy-of select="path/to/some/nodes[. div $foo &lt; 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]