Project

Profile

Help

Bug #4029 » test.xsl

saxon:path() test XSLT - David Sewell, 2018-11-15 20:31

 
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:saxon="http://saxon.sf.net/"
version="3.0">
<xsl:mode on-no-match="shallow-copy"/>
<xsl:template match="i">
<xsl:copy>
<xsl:if test="matches(., 'nugget')">
<xsl:message>Found a nugget at <xsl:value-of select="saxon:path()"/></xsl:message>
</xsl:if>
<xsl:apply-templates/>
</xsl:copy>
</xsl:template>
</xsl:stylesheet>
(2-2/2)