xsl-list
[Top] [All Lists]

Re: ACCESSING SPECIFIC CDATA FIELD

2005-12-13 10:28:41
viniciuscamara(_at_)yahoo(_dot_)com(_dot_)br 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 : téléphonez moins cher avec Yahoo! Messenger ! Découvez les tarifs 
exceptionnels pour appeler la France et l'international.
Téléchargez sur http://fr.messenger.yahoo.com

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--