[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: problem passing parameter to apply-templates

Subject: Re: problem passing parameter to apply-templates
From: Paula Estrella <paula_ile2003@xxxxxxxxxxxx>
Date: Thu, 1 Sep 2005 12:54:25 -0300 (ART)
xsl select parameter
 --- David Carlisle <davidc@xxxxxxxxx> escribis:

> but not the part of the code that causing the
> problem.
> 
Yes it's the line between arrows (-->); I posted
everything I have ...

>  <xsl:apply-templates
> select="document('../xml/clasif2.xml')/clasif2">
> 
the select above returns a node set with "item"s that
is matched with the template matching item.


<!-- .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>


<!-- 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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.