jdk/test/javax/xml/jaxp/transform/jdk8004476/tokenize.xsl
author joehw
Thu, 24 Oct 2013 14:13:09 -0700
changeset 21364 decde35d5139
permissions -rw-r--r--
8004476: XSLT Extension Functions Don't Work in WebStart Reviewed-by: dfuchs, lancea, alanb

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
                xmlns:str="http://exslt.org/strings"
                xmlns:xalan="http://xml.apache.org/xalan"
                version="1.0">
<xsl:template match="a">
   <xsl:apply-templates />
</xsl:template>
<xsl:template match="//a/c">
   <xsl:value-of select="." />
 -
      <xsl:value-of select="str:tokenize(string(.), ' ')" />
   <xsl:value-of select="str:tokenize(string(.), '')" />
   <xsl:for-each select="str:tokenize(string(.), ' ')">
      <xsl:value-of select="." />
   </xsl:for-each>
   <xsl:apply-templates select="*" />
</xsl:template>
<xsl:template match="//a/b">
   <xsl:value-of select="." />
 -
      <xsl:value-of select="xalan:tokenize(string(.), ' ')" />
   <xsl:value-of select="xalan:tokenize(string(.), '')" />
   <xsl:for-each select="xalan:tokenize(string(.), ' ')">
      <xsl:value-of select="." />
   </xsl:for-each>
   <xsl:apply-templates select="*" />
</xsl:template>

</xsl:stylesheet>