Subject: Re: [xsl] mixing recursive template calls and for-each From: Yvan Peter <Yvan.Peter@xxxxxxxxxxxxxx> Date: Thu, 04 Jul 2002 14:15:09 +0200 |
<page> <link> <text>desc_wi_1</text> <url>wi_1</url> </link> <link> <text>desc_wi_2</text> <url>wi_2</url> </link> </page>
<xsl:template match="place:list-of"> <xsl:variable name="element" select="@node" /> <xsl:variable name="items" select="source//*[name() = $element]" /> <xsl:variable name="template" select="*[position() >= 2]" /> <xsl:for-each select="$items"> <xsl:apply-templates select="$template"> <xsl:with-param name="item" select="." /> </xsl:apply-templates> </xsl:for-each> </xsl:template>
<xsl:template match="place:value-of"> <xsl:param name="item" select="/.." /> <xsl:variable name="element" select="@name" /> <xsl:value-of select="$item/*[name() = $element]" /> </xsl:template>
<xsl:template match="node()|@*"> <xsl:param name="item" select="/.." /> <xsl:copy> <xsl:apply-templates select="node()|@*"> <xsl:with-param name="item" select="$item" /> </xsl:apply-templates> </xsl:copy> </xsl:template>
-- ------------------------------------------------------------------ | Yvan Peter | phone (33) 3.20.43.32.64 | | CUEEP/Laboratoire TRIGONE | fax (33) 3.20.43.32.79 | | Bat. B6 | mail Yvan.Peter@xxxxxxxxxxxxxx | | Cite Scientifique | | | 59655 Villeneuve d'Ascq Cedex | | ------------------------------------------------------------------
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] mixing recursive template, Jeni Tennison | Thread | RE: [xsl] Printing a value of a nod, Gertjan Assies |
RE: [xsl] disable-output-escaping n, Julian Reschke | Date | RE: [xsl] disable-output-escaping n, Andrew Welch |
Month |