IMPORTANT:
this is not a Support Forum! Experienced users might answer from time to time questions posted here. If you need a professional and reliable answer, or if you want to report a bug, please contact Altova Support instead.

Regular expression problem Options · View
ceving
Posted: Friday, October 30, 2009 9:32:42 AM
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
island
Posted: Friday, October 30, 2009 10:50:21 AM
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)
Users browsing this topic
guest

Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Use of the Altova User Forum(s) is governed by the Altova Terms of Use.