M
mikea59
I am getting errors in XMLSpy (Pro) in the following case:
Source Document:
<test> 12345 AB 12345 </test>
Stylesheet:
<xsl:stylesheet version="2.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >
<xsl:template match="test">
<xsl:analyze-string select="."
regex=".* ([A-Z]+).*">
<xsl:matching-substring>
Here it is: <xsl:value-of select="regex-group(1)"/>
</xsl:matching-substring>
<xsl:non-matching-substring>
Didn"t find it.
</xsl:non-matching-substring>
</xsl:analyze-string>
</xsl:template>
</xsl:stylesheet>
XMLSpy tells me that "regex-group(1)" is not valid. Can anyone explain
why?
Source Document:
<test> 12345 AB 12345 </test>
Stylesheet:
<xsl:stylesheet version="2.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >
<xsl:template match="test">
<xsl:analyze-string select="."
regex=".* ([A-Z]+).*">
<xsl:matching-substring>
Here it is: <xsl:value-of select="regex-group(1)"/>
</xsl:matching-substring>
<xsl:non-matching-substring>
Didn"t find it.
</xsl:non-matching-substring>
</xsl:analyze-string>
</xsl:template>
</xsl:stylesheet>
XMLSpy tells me that "regex-group(1)" is not valid. Can anyone explain
why?