Subject: RE: RE: [xsl] problem passing parameter to apply-templates From: Paula Estrella <paula_ile2003@xxxxxxxxxxxx> Date: Tue, 30 Aug 2005 20:39:25 -0300 (ART) |
Ok, here is the code: <!-- .xsl applied to test.xml --> <xsl:template match="page"> <html><head></head> <body> <xsl:apply-templates select="title"/><br/> <xsl:apply-templates select="document('../xml/clasif2.xml')/clasif2"> <xsl:with-param name="nodes" select="'blabla'"/> </xsl:apply-templates> </form> </body> </html> </xsl:template> <xsl:template match="item"> --><xsl:value-of select="$nodes"/><-- <xsl:variable name="atri" select="@level"/> <xsl:variable name="idx" select="./@ref"/> <xsl:choose> <xsl:when test="$atri = 'leaf' "> <a href="javascript:popUp('t_{./@ref}.html')"> <b><xsl:value-of select="@name"/></b> </a> </xsl:when> <xsl:otherwise> Node: <xsl:value-of select="@name"/> <xsl:apply-templates> <xsl:with-param name="nodes" select="$nodes"/> </xsl:apply-templates> </xsl:otherwise> </xsl:choose> </xsl:template> <!-- clasif2.xml used above --> <item ref="405" name="Methodology" level=""> <item ref="407" name="models" level="leaf"> </item> <item ref="408" name="Statistical models" level="leaf"> </item> <item ref="409" name="Example models" level="leaf"> </item> <item ref="410" name="memory models" level="leaf"> </item> </item> <!-- test.xml --> <?xml version="1.0" encoding="UTF-8"?> <page> <checked data="102"/> <checked data="112"/> <checked data="122"/> <checked data="132"/> </page> __________________________________________________ Correo Yahoo! Espacio para todos tus mensajes, antivirus y antispam !gratis! !Abrm tu cuenta ya! - http://correo.yahoo.com.ar
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: RE: [xsl] problem passing param, cknell | Thread | Re: [xsl] problem passing parameter, David Carlisle |
RE: RE: [xsl] problem passing param, cknell | Date | [xsl] help understanding xslt proc, jonec |
Month |