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

RE: String Manipulation - Distinguishing alphas and nu

Subject: RE: String Manipulation - Distinguishing alphas and numerics in a string
From: "Michael Kay" <michael.h.kay@xxxxxxxxxxxx>
Date: Thu, 31 Oct 2002 17:20:49 -0000
xslt fo string manipulation
This is made very easy by <xsl:analyze-string> in XSLT 2.0, so if you
want to play with the latest toys, you could try using this in Saxon 7.2

Michael Kay
Software AG
home: Michael.H.Kay@xxxxxxxxxxxx
work: Michael.Kay@xxxxxxxxxxxxxx 

> -----Original Message-----
> From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx 
> [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of 
> TEA Lanham, Kevin
> Sent: 30 October 2002 20:13
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject:  String Manipulation - Distinguishing alphas 
> and numerics in a string
> 
> 
> Does anyone know how to do this? (the chemistry is not the 
> issue, I realize this is a bogus combination)
> 
> 
> XML source: 
> <para>candybars are made of <chemical>H20ClF3</chemical>.</para>
> 
> 
> XSL needed?????
> <xsl:template match="chemical">
>   <xsl:variable name="this_chemical" select="."/>
> 
> <!-- This is the part I'm stuck on. How do I process the 
> string? The translate function only wants to replace 
> something. How do I walk through the string and wrap each 
> number with the FO for subscript? -->
> 
> </xsl:template>
> 
> XSL-FO desired:
> 
> <fo:block>water is made of H<fo:inline baseline-shift="sub"
> >2</fo:inline>OClF<fo:inline baseline-shift="sub" 
> >>3</fo:inline>.</fo:block>
> 
> Thanks,
> 
> Kevin
> 
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
> 
> 


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

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.
Email
First Name
Last Name
Company
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.