Rank: Newbie
Joined: 10/1/2009 Posts: 5 Location: DE
|
I tried to convert a string of the form substr1-substr2-substr3 into the form Substr1Substr2Substr3. I tried to implement it with analyze-string in this way:
Code:<xsl:analyze-string select="@name" regex="^.|-."> <xsl:matching-substring> <xsl:value-of select="replace(upper-case(.), '-', '')"/> </xsl:matching-substring> <xsl:non-matching-substring> <xsl:value-of select="."/> </xsl:non-matching-substring> </xsl:analyze-string>
When I use Saxon with the XSL file it works fine. When I use XMLSpy 2010 (I installed it a few minutes ago) the whole string is converted to upper case letters. It seems to me that XMLSpy does not support ^ for the beginning of a string in regular expressions.
Is this a bug?
Regards
|
Rank: Newbie
Joined: 10/28/2002 Posts: 1,283 Location: AT
|
This would appear to be a bug and has now been submitted to the interal bug database for the developers to take a look at.
(caret is not a meta character in xml schema regular expressions, but has been reinstated as a metacharacter in xslt regular expressions, this is where the problem seems to lie)
|