Article View: fr.comp.text.xml
Article #9155Re: [xslt] Iteration sur la valeur d'un parametre
From: Joel Fillon
Date: Thu, 17 May 2001 09:41
Date: Thu, 17 May 2001 09:41
47 lines
2362 bytes
2362 bytes
Alain Ketterlin a οΏ½crit :
> > Est-ce qu'il existe une facon de s'en sortir autrement ?
>
> Oui en general, mais non standard. Tout depend du processeur que tu
> utilises. D'habitude, cela s'appelle nodeset() ou node-set()...
>
> (C'etait prevu dans feu XSLT 1.1, et ce sera surement dans 2.0.)
>
> -- Alain.
J'utilise xalan-java 1.2.D02.
J'ai essaye <xsl:for-each select="nodeset($p)"> et
<xsl:for-each select="node-set($p)"> sans succes.
Faut-il utiliser les fonctions d'extensions ? Qqch du genre :
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:lxslt="http://xml.apache.org/xslt/java">
<xsl:template name="t">
<xsl:param name="p"/>
<xsl:variable name="iterator"
select="lxslt:org.apache.xalan.xpath.XRTreeFrag.new($p)"/>
<xsl:for-each select="lxslt:nodeset($iterator)">
...
</xsl:for-each>
</xsl:template>
<xsl:template match="/">
<xsl:call-template name="t">
<xsl:with-param name="p">
<elem1/>
<elem2/>
<elem3/>
</xsl:with-param>
</xsl:call-template>
</xsl:template>
</xsl:stylesheet>
Mais xalan n'arrive pas a instancier XRTreeFrag de cette facon.
Au passage, j'ai vu qu'il existe xalan-java 2.0.1. Je devrais peut-etre
commencer
par installer la derniere version ?
Joel
Technical Details
Message-ID:
<3B039CB4.5C587DFB@sophia.inria.fr>Path:
arc1-ca.pugleaf.net!archiver1.sj.google.com!newsfeed.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!isdnet!ciril.fr!univ-lille1.fr!news!univ-rennes1.fr!irisa.fr!news-rocq!news-sop.inria.fr!not-for-mailReferences:
<3B02B1A9.F7004F38@sophia.inria.fr> <wyk83hmanf.fsf@polya.u-strasbg.fr>Show Full Headers
Complete Article Headers
X-Google-Language: FRENCH,ASCII X-Google-Thread: 114f60,c5caf1910eaf78cf X-Google-Attributes: gid114f60,public X-Google-ArrivalTime: 2001-05-17 02:59:02 PST Path: arc1-ca.pugleaf.net!archiver1.sj.google.com!newsfeed.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!isdnet!ciril.fr!univ-lille1.fr!news!univ-rennes1.fr!irisa.fr!news-rocq!news-sop.inria.fr!not-for-mail From: Joel Fillon <Joel.Fillon@sophia.inria.fr> Newsgroups: fr.comp.text.xml Subject: Re: [xslt] Iteration sur la valeur d'un parametre Date: Thu, 17 May 2001 11:41:08 +0200 Organization: INRIA Sophia Antipolis Lines: 47 Message-ID: <3B039CB4.5C587DFB@sophia.inria.fr> References: <3B02B1A9.F7004F38@sophia.inria.fr> <wyk83hmanf.fsf@polya.u-strasbg.fr> NNTP-Posting-Host: flambis.inria.fr Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Mailer: Mozilla 4.75 [fr] (Windows NT 5.0; U) X-Accept-Language: fr-FR,en