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

Using variables in template match patterns?

Subject: Using variables in template match patterns?
From: Geert Josten <Geert.Josten@xxxxxxxxxxx>
Date: Mon, 11 Jul 2005 15:06:53 +0200
variable in template match
Hi all,

Can anyone tell me whether it is or isn't conform XSLT (1.0) to use variable references in template match patterns? I have something like the following, that is accepted by Xalan, but not by some other parsers:

	<!-- top level -->
	<xsl:param name="selected" />

	<xsl:template match="entry[@id = $selected]">
	  ...
	</xsl:template>

I also use variables to add a filter on a key pattern, something like this:

<xsl:key name="selected-entries" match="entry[@parent-id = $selected]" use="@id" />

Again, Xalan is happy, but some other parsers aren't..

Who is right?

Cheers,
Geert

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.