xsl-list
[Top] [All Lists]

Re: Another tokenize() question

2004-08-11 03:35:55


Now I know I'm being a pain, but when I use that I get:

Hmph so I. 

Saxon  expected ()) but I didn't (perhaps Mike will answer:-)
but simplest is to avoid { and } and use something else, bracketing
by unicode chars 1001 and 1002 (No idea if they are assigned, xml
doesn't care:-) seems to work.

running this on itself shows two "words" and a non word " , "

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
                 version="2.0">

<xsl:output method="text"/>
<xsl:template match="/">

:
<xsl:analyze-string
regex="(\w|&#1001;[^&#1001;&#1002;]*&#1002;)+" 
select="'abcd&#1001;e&#1002;fg , foo'">
<xsl:matching-substring>
MS: <xsl:value-of select="."/>
</xsl:matching-substring>
<xsl:non-matching-substring>
NS:<xsl:value-of select="."/>
</xsl:non-matching-substring>
</xsl:analyze-string>
:

</xsl:template>

</xsl:stylesheet>



________________________________________________________________________
This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________