[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: XSLT 2.0 Matching characters above 255

Subject: RE: XSLT 2.0 Matching characters above 255
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Tue, 1 Mar 2005 14:53:55 -0000
xslt codepoints to string
You could use 

<xsl:for-each select="string-to-codepoints(.)"
    <xsl:when test=". > 255">
      <span><xsl:value-of select="codepoints-to-string(.)"/></span>
      <xsl:value-of select="codepoints-to-string(.)"/>

Michael Kay

> -----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 &#120514; BCD &#120515; EFG &#120516; </entry>
> </root>
> The required output is:
> <root>
>   <entry>A <span>&#120514;</span> BCD <span>&#120515;</span> EFG
> <span>&#120516;</span> </entry>
> </root>
> I thought about using <xsl:analyze-string>, can regex's can do
> comparisons like this?
> thanks
> andrew

Current Thread


Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
First Name
Last Name
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.