Subject: Re: [xsl] ACCESSING SPECIFIC CDATA FIELD From: drkm <darkman_spam@xxxxxxxx> Date: Tue, 13 Dec 2005 18:28:41 +0100 (CET) |
viniciuscamara@xxxxxxxxxxxx wrote: > Thanks Jon and friends, What about sisters ?-) > for your explanation about CDATA nodes. > Well, I tried to use your idea "<xsl:value-of > select="text()[1]" />" to access the text inside the node > <etp id="200"> (see the code bellow), and spected this > return: "Trying accessing only this", but returned empty > to me. > > <etp id="200"> > > <![CDATA[Trying accessing only this]]> > > <nvgs> Maybe your parser makes a text node for "\n ", between the 'etp' element and the CDATA section, and an other text node for the cntent of the CDATA section itself. I think it has to merge all the text in 'etp' before the 'nvgs' element in one single text node. Can someone confirm this? What produces <xsl:value-of select='text()[2]'/> ? And what produces the following (to be sure you get an empty string, and not a string full of spaces): <xsl:value-of select="translate(text()[1], ' ', '_')"/> ? > When I put the prefix "." return to me "Trying accessing > only this" + "blablablablabla" + "blablablablabla", with > your descedents. As said, it's the way 'xsl:value-of' works. It uses all text nodes descendants of "." (depending of the select expression, indeed). And CDATA are just text pieces. > Is it necessary to use the node to separate the texts > inside the node? I don't understand this sentence. Can you explain a bit further, please? --drkm ___________________________________________________________________________ Nouveau : tiliphonez moins cher avec Yahoo! Messenger ! Dicouvez les tarifs exceptionnels pour appeler la France et l'international. Tilichargez sur http://fr.messenger.yahoo.com
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] ACCESSING SPECIFIC CDATA , viniciuscamara | Thread | RE: [xsl] ACCESSING SPECIFIC CDATA , Michael Kay |
[xsl] [ANN] xmlroff 0.3.8 -- Stabil, Tony Graham | Date | [xsl] nesting flat XML based on att, David Holden |
Month |