|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: XSLT 2.0 Matching characters above 255
You could use
<xsl:for-each select="string-to-codepoints(.)"
<xsl:choose>
<xsl:when test=". > 255">
<span><xsl:value-of select="codepoints-to-string(.)"/></span>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="codepoints-to-string(.)"/>
</xsl:otherwise>
</xsl:choose>
</xsl:for-each>
Michael Kay
http://www.saxonica.com/
> -----Original Message-----
> From: Andrew Welch [mailto:ajwelch@xxxxxxxxxxxxxxx]
> Sent: 01 March 2005 14:33
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject: XSLT 2.0 Matching characters above 255
>
>
>
> Hi,
>
> I would like to wrap any characters above 255 in <span> tags. I'm not
> sure it's possible...
>
> For this input XML:
>
> <root>
> <entry>A 𝛂 BCD 𝛃 EFG 𝛄 </entry>
> </root>
>
> The required output is:
>
> <root>
> <entry>A <span>𝛂</span> BCD <span>𝛃</span> EFG
> <span>𝛄</span> </entry>
> </root>
>
> I thought about using <xsl:analyze-string>, can regex's can do
> comparisons like this?
>
> thanks
> andrew
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








