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

Re: cdata()

Subject: Re: cdata()
From: Mike Brown <mike@xxxxxxxx>
Date: Wed, 12 Mar 2003 12:22:52 -0700 (MST)
nodetypedvalue xsl
Hélder Sousa wrote:
> I have an old xsl file that use the namespace <xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl"> 
> In this xsl is used the following code:
> 
> <xsl:for-each select="cdata()">
> 	<xsl:eval no-entities="1">this.nodeTypedValue</xsl:eval>
> </xsl:for-each>
> 
> This code select all CDATA sections, using "cdata()", and write the value of each CDATA section. (this works fine!)
> But using the namespace above I can't use "<xsl:call-template name="xpto">
> So I use the namespace <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> but this don't recognize the "cdata()" function! 
> Anyone can help me?

CDATA sections are not part of the XPath 1.0 data model. All adjacent
character data in an element, whether PCDATA or CDATA, becomes one text node.
You can select or match on a text node with text().

However I think you can replace the entire for-each with
<xsl:value-of select="."/>
or
<xsl:value-of seelct="text()"/>

Mike

-- 
  Mike J. Brown   |  http://skew.org/~mike/resume/
  Denver, CO, USA |  http://skew.org/xml/

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


Current Thread
  • cdata()
    • Hélder Sousa - Tue, 11 Mar 2003 12:09:04 -0500 (EST)
      • Mike Brown - Wed, 12 Mar 2003 14:19:34 -0500 (EST) <=

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.