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

Re: character replacement

Subject: Re: character replacement
From: António Mota <amsmota@xxxxxxxxx>
Date: Fri, 7 Jan 2005 16:20:40 +0000
xsl replace character
But that's strange, since translate only "replaces" a character and a
character reference references a character (!) i went to try

	<xsl:template match="*">
		<xsl:copy-of select="translate(., 'b,', '&#8364;')" />
        </xsl:template>

on this xml

<teste>$B#b,</teste>

and the output was

$B#&#8364;

so what was your problem?

On Fri, 07 Jan 2005 16:55:26 +0100, Sven Waibel <sven.waibel@xxxxxxxx> wrote:
> Thanks this helps a lot.
>
> Sven
>
> AntC3nio Mota wrote:
>
> > Take a look at the FAQ
> >
> > http://www.dpawson.co.uk/xsl/sect2/replace.html
> >
> > but since youre using character entitys maybe there is another way...
> >
> >
> > On Fri, 07 Jan 2005 16:42:30 +0100, Sven Waibel <sven.waibel@xxxxxxxx>
wrote:
> >
> >>Hello,
> >>
> >>i want to replace in my xml file all occurrences of b, with &#8364;
because it should be display in my pdf in the right way.
> >>
> >>I tried it with
> >>
> >><xsl:template match="@*|*">
> >>        <xsl:value-of select="translate(.,'b,','&#8364;')"/>
> >></xsl:template>
> >>
> >>or
> >>
> >><xsl:template match="@*|*">
> >>        <xsl:value-of select="replace(.,'b,','&#8364;')"/>
> >></xsl:template>
> >>but the function replace is not recognized
> >>
> >>Does anybody know how to get this working?
> >>
> >>thanks and best regards
> >>Sven

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.