Re: Comment afficher les données contenu dans un CData!

Eric van der Vlist <[email protected]>
Newsgroups gmane.text.xml.french.tech
Organization Dyomedea (http://dyomedea.com)
Message-ID <[email protected]>
Bonjour,
Le mercredi 12 avril 2006 à 17:31 +0200, Oscar NIYONKURU a écrit :
> Bonjour,
>    
>   Quelqu'un saurait-il comment je peux afficher les données contenues à l'intérieur de la balise CData?

En XSLT?

Si c'est le cas, la réponse est simple : XSLT et XPath ne voient pas les
balises CDATA qui ne sont que des artifices pour écrire un document.

Autrement dit, si votre document est :

<foo>Ici j'ai une balise <![CDATA[ avec plein de caractères bizarres
<>&#! ]]>...</foo>

Pour XPath, l'élément foo contient un noeud texte unique dont la valeur
est la chaîne :

"Ici j'ai une balise  avec plein de caractères bizarres <>&#! ..."

C'est inhérent au modèle de données XPath et cela ne peut pas être
contourné. 

Cordialement,

Eric van der Vlist

-- 
GPG-PGP: 2A528005
Have you ever thought about unit testing XSLT templates?
                                                     http://xsltunit.org
------------------------------------------------------------------------
Eric van der Vlist       http://xmlfr.org            http://dyomedea.com
(ISO) RELAX NG   ISBN:0-596-00421-4 http://oreilly.com/catalog/relax
(W3C) XML Schema ISBN:0-596-00252-1 http://oreilly.com/catalog/xmlschema
------------------------------------------------------------------------


-- Attached file included as plaintext by Ecartis --

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQBEPR7+Dvn+ZCpSgAURAiK8AJ9JAeFXMtNcQtdfFZLjAKKoGN4XCACcCCvn
//yipIV7YU5kmELv8pImQ0Q=
=5wFT
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.