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: Keep it simple S...


Jarno.Elovirta@nokia.com wrote:
> <xsl:if test="contains($getit, '&quot;')">

Sometimes even that's not enough.
For example, you can't have

  <xsl:if test="contains($getit, '&apos;')">

because the XPath expression is unparseable, even though
the attribute is. For those circumstances, define

<xsl:variable name="q">'</xsl:variable>
<xsl:variable name="qq">"</xsl:variable>

and reference $q or $qq where needed.

Example:

<xsl:value-of select="concat('he said, ',$qq,'don',$q,'t worry.',$qq)"/>

   - Mike
____________________________________________________________________________
  mike j. brown, fourthought.com  |  xml/xslt: http://skew.org/xml/
  denver/boulder, colorado, usa   |  personal: http://hyperreal.org/~mike/

 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]