substring-after demo : substring after « XSLT stylesheet « XML






substring-after demo


File: Data.xml
<poem>
  <verse>line 1</verse>
  <verse>

    line 2

  </verse>
</poem>

File: Transform.xslt
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  version="1.0">
  <xsl:output method="xml" omit-xml-declaration="yes" indent="no" />
  <xsl:template match="verse">
    <xsl:value-of select="." />
    <xsl:value-of select="substring-after(.,'desolation')" />
  </xsl:template>

  
</xsl:stylesheet>
Output:


  line 1
  

    line 2

  

 








Related examples in the same category

1.substring-after() and text()