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

RE: param-value in Expression

Subject: RE: param-value in Expression
From: "Michael Kay" <mhkay@xxxxxxxxxxxx>
Date: Wed, 23 May 2001 18:39:31 +0100
xsl param value of
Firstly, I don't know what processor you're using, but you should replace
all the "expr" keywords by "select".

Secondly, you seem to be expecting the parameters to behave like
expressions, evaluated in the context where they are used. They aren't: they
are evaluated in the context where they are declared. So a global parameter
with select="@name" selects the name attribute of the root node; root nodes
don't have attributes, so its value is an empty set.

Mike Kay
Software AG

> -----Original Message-----
> From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx]On Behalf Of
> UweLoydl@xxxxxx
> Sent: 23 May 2001 18:17
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject:  param-value in Expression
>
>
> I wonder why my for-each select=... doesn't work. Wenn I use
> $root[@name='blabla'] it works fine.
>
> <xsl:param name="root" expr="teams/team"/>
> <xsl:param name="rootstring" expr="'teams/team'"/>
> <xsl:param name="filterattr" expr="@name"/>
> <xsl:param name="filter" expr="'blabla'"/>
> <xsl:template match="/">
> 	<html>
> 		<head></head>
> 		<body>
> 		<form>
> 		<table border="1">
> 		<xsl:for-each select="$root[$filterattr=$filter]/*">
> 			<xsl:call-template name="children">
> 				<xsl:with-param name="list" select="."/>
> 				<xsl:with-param name="tree"
> select="$rootstring"/>
> 			</xsl:call-template>
> 		</xsl:for-each>
> 		</table>
> 		</form>
> 		</body>
> 	</html>
> </xsl:template>
>
> <xsl:template name="children">
> .
> .
> .
>
> </xsl:template>
>
> --
> Uwe
>
>
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
>


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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.