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

Re: usage of entities (for dummies)

Subject: Re: usage of entities (for dummies)
From: David Carlisle <davidc@xxxxxxxxx>
Date: Thu, 3 Aug 2006 11:02:47 +0100
Re:  usage of entities (for dummies)
> Do i have to nest replace-functions for each of them in one
> another like ...
> <xsl:value-of select="replace(replace(., '\^12', '&ccedil;'), '\^13',
> '&amp;')"/>
> ... or is there a more elegant solution for this?
in the most general case of course, nesting replace() calls is always an
> option but here I suspect that you can do something like


<xsl:analayze-space select="." regex="\^([0-9]+)">
<xsl:matching-substring>
<xsl:value-of select="$replacements[number(regex-group(1))]"/>
<xsl:matching-substring>
<xsl:non-matching-substring>
<xsl:value-of select="."/>
</xsl:non-matching-substring>


together with something that makes $replacements a sequemce with  a
c-cedila in position 12
 eg

<xsl:variable name="replacements"  select="(
'a','b',...,'&#e7;', '&amp;')
"/>

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-2011 All Rights Reserved.