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

RE: CDATA elements in XSLT

Subject: RE: CDATA elements in XSLT
From: "Dario Romero" <darioromero@xxxxxxxxxxx>
Date: Wed, 26 May 2004 15:03:54 +0000
dario romero
Sorry, don't know how to reply to a specific thread in the list. And thank you for all your advise. I solved the problem using in the declaration this instruction:

<xsl:output method="xml" cdata-section-elements="PoolName" version="1.0" encoding="UTF-8" indent="yes" standalone="yes"/>

Thx,
Dario


From: "Dario Romero" <darioromero@xxxxxxxxxxx>
Reply-To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject:  CDATA elements in XSLT
Date: Tue, 25 May 2004 17:45:09 +0000

Hi everybody,

I am using a xslt transformation on an xml file which has this structure
(... this is only a subset):

xml file:
<AllWells>
 <Wells>
   <WellID>200-100</WellID>
   <PoolName>America &amp; Brownie</PoolName>
 </Wells>
 <Wells>
   <WellID>200-110</WellID>
   <PoolName>Jiraffe &amp; Breton</PoolName>
 </Wells>
</AllWells>

xslt file:
......
<xsl:template match="Wells">
 <element no_chars="?">
   <xsl:value-of select="PoolName/text()"/>
 </element>
</xsl:template>

The question is; How can I escape the & sign from the xml file to the xml
output so I can write to the xml output: "America & Brownie" instead of
having: "America &amp; Brownie".

I also need to count on the number of characters for "America & Brownie" and
not from "America &amp; Brownie".


I have read about CDATA but doesn't seems to be the better solution. Could
someone give me some advise on this ? Thank you.

Dario

_________________________________________________________________
FREE pop-up blocking with the new MSN Toolbar  get it now! http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/



_________________________________________________________________
Watch LIVE baseball games on your computer with MLB.TV, included with MSN Premium! http://join.msn.click-url.com/go/onm00200439ave/direct/01/


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.