RE: Should expansions be allowed in select/match strings ? (OR ca n you solve this without this !?)

Subject: RE: Should expansions be allowed in select/match strings ? (OR ca n you solve this without this !?)
From: Kay Michael <Michael.Kay@xxxxxxx>
Date: Mon, 29 Mar 1999 11:09:35 +0100
Title: RE: Should expansions be allowed in select/match strings ? (OR can you solve this without this !?)

> I'm trying to solve a problem in a stylesheet where I need to
> reference another element based upon a match between 2
> attributes.

If XSL is to be extended to accommodate this requirement, I'm sure the right answer is something like range variables in SQL, rather than fiddling about with textual substitution mechanisms.

Something like:

<xsl:template match="file" as="$file">
  <xsl:for-each select="//item[@name=$file/@filename]">

(sorry this doesn't match your example but I hope you get the idea...)

Of course this could be part of a general mechanism for using variables in XSL (the current "counters" are an initial and very restrictive attempt).

Mike Kay

Current Thread