9
I just want to know if it's possible to use regular expressions in the match attribute of the xsl:template element.
For example, suppose I have the follow XML document:
<greeting>
<aaa>Hello</aaa>
<bbb>Good</bbb>
<ccc>Excellent</ccc>
<dddline>Line</dddline>
</greeting>
Now the XSLT to transform the above document:
<xsl:stylesheet>
<xsl:template match="/">
<xsl:apply-templates select="*"/>
</xsl:template>
<xsl:template match="matches(node-name(*),'line')">
<xsl:value-of select="."/>
</xsl:template>
</xsl:stylesheet>
When I try to use the syntax matches(node-name(*),'line$') in the match attribute of the xsl:template element, it retrieves a error message. Can I use regular expressions in the match attribute?
Thanks very much