Subject: [xsl] xslt 2.0 regex From: davep <davep@xxxxxxxxxxxxx> Date: Sat, 17 Mar 2012 13:37:15 +0000 |
I believe variable names follow the name construct http://www.w3.org/TR/REC-xml/#NT-Name [5] less the :
<xsl:variable name="NameStartChar.re" as="xs:string"> $[A-Z]|_|[a-z] | [À-Ö] | [Ø-ö] | [ø-˿] | [Ͱ-ͽ] | [Ϳ-῿] | [‌-‍] | [⁰-↏] | [Ⰰ-⿯] | [、-퟿] | [豈-﷏] | [ﷰ-�] | [𐀀-] </xsl:variable>
<xsl:variable name="NameChar.re" as="xs:string" select="concat($NameStartChar.re,' | - | . | [0-9] | · | [̀-ͯ] | [‿-⁀]')"/>
<xsl:variable name='Name.re' select='concat($NameStartChar.re, "(", $NameChar.re,")*")'/>
<xsl:template match="*"> <xsl:if test="matches(@select, $Name.re,'x') "> <xsl:message> <xsl:value-of select="name()"/><xsl:text> </xsl:text> <xsl:value-of select="@select"/> <xsl:text> </xsl:text> </xsl:message> </xsl:if>
For some reason the regex is matching on other than $.... and I can't see why?
-- Dave Pawson XSLT XSL-FO FAQ. http://www.dpawson.co.uk
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Re: group together subsequent, Matej Cepl | Thread | Re: [xsl] xslt 2.0 regex, Imsieke, Gerrit, le- |
Re: [xsl] group together subsequent, Graydon | Date | [xsl] Re: group together subsequent, Matěj Cepl |
Month |