EXSLT - regexp:test - Use Case 1

Category: example
XML Definition: regexp.test.xml
Function or Template: function

Use Case

Source (view)

<?xml-stylesheet type="text/xsl" href="regexp.test.1.xsl"  ?>
<a>
   <c>Is this EXSLT? No. no</c>
</a>

Stylesheet (view)

<xsl:import href="regexp.test.msxsl.xsl" />
<xsl:template match="a">
   <xsl:apply-templates />
</xsl:template>
<xsl:template match="*">
   <out>
      <xsl:value-of select="." />
 -
               <xsl:value-of select="regexp:test(string(.), 'no', 'g', 'yes!!!')" />
      <xsl:value-of select="regexp:test(string(.), 'no', 'gi', 'yes!!!')" />
      <xsl:apply-templates select="*" />
   </out>
</xsl:template>

Result (view)

<out>Is this EXSLT? No. no -
         truetrue</out>

Change History

Previous Version: ..NaN.html

VersionModifiedByDetails
2001-06-24Chris Bayes

http://www.exslt.org/regexp/functions/test/regexp.test.use-case.1.html last modified 2001-06-24