Article View: fr.comp.text.xml
Article #8553<xsl:apply-templates> d�connant...?
From: Gillou
Date: Mon, 10 Sep 2001 20:54
Date: Mon, 10 Sep 2001 20:54
55 lines
2299 bytes
2299 bytes
Bonjour, Je croyais que ce type de transformation �tait trivial mais voil�-t-y pas que MSXML3 me pose un probl�me... A partir d'un XML du type <racine> ... <listedef> <item>un</item> <item>deux</item> <item>trois</item> </listedef> <listedef> <item>quatre</item> <item>cinq</item> </listedef> ... </racine> Je colle une feuille de style contenant: <xsl:template match="/"> ... <xsl:apply-templates select="//listedef"/> ... </xsl:template> <xsl:template match="listedef"> <ul> <xsl:apply-templates/> </ul> <xsl:apply-templates/> <xsl:template match="item"> <li> <xsl:apply-templates/> <!-- provoque l'erreur !!!! --> </li> <xsl:apply-templates/> Il n'y a pas de message d'erreur, la transformation �tant lanc�e sous javascript "htmlDoc = xmldoc.transformNode(xsldoc)". Je r�cup�re un "htmlDoc" vide. Si je retire l' <xsl:apply-templates> qui provoque l'erreur, je r�cup�re bien autant de couples <li></li> vides qu'il y a d'�l�ments <item> dans le XML. Comment se fait-il que <xsl:apply-templates/> refuse de retourner le texte dans les <item> et am�ne � un r�sultat global vide ? Je me suis gour� ou bien y a-t-il un bug dans le processeur XSLT de MSXML3 ? Merci d'avance de votre aide ! --Gillou
Technical Details
Message-ID:
<9nj8vu$2c8m$1@norfair.nerim.net>Path:
arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!newsfeed.gamma.ru!Gamma.RU!opentransit.net!wanadoo.fr!teaser.fr!nerim.net!norfair.nerim.net!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: FRENCH,ASCII X-Google-Thread: 114f60,becc50fb37e1dd,start X-Google-Attributes: gid114f60,public X-Google-ArrivalTime: 2001-09-10 13:49:04 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!newsfeed.gamma.ru!Gamma.RU!opentransit.net!wanadoo.fr!teaser.fr!nerim.net!norfair.nerim.net!not-for-mail From: "Gillou" <nospam@bigfoot.com> Newsgroups: fr.comp.text.xml Subject: <xsl:apply-templates> d�connant...? Date: Mon, 10 Sep 2001 22:54:47 +0200 Organization: Nerim -- xDSL Internet Provider Lines: 57 Message-ID: <9nj8vu$2c8m$1@norfair.nerim.net> NNTP-Posting-Host: aboukir-101-1-2-pilot.adsl.nerim.net X-Trace: norfair.nerim.net 1000154942 78102 62.4.20.186 (10 Sep 2001 20:49:02 GMT) X-Complaints-To: abuse@nerim.net NNTP-Posting-Date: Mon, 10 Sep 2001 20:49:02 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.3018.1300 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.3018.1300