-----Original Message-----
From: Nikolas Nehmer
I'm using a cascade of XSL files. One which serves as
interface e.g. person.xsl for all person xmls and dependent on the
person xml it calls a specific xsl. So in my case the key definition
should base on a param which holds the nodeset to transformed. BUT the
key definition is made before the param is defined within the template:
<xsl:key name="elements-by-name" match="/*/*" use="name(.)" />
<xsl:template name="default">
<xsl:param...
So the match attribute /*/* should base on the param which is defined
later (because xsl:key has to be drclared as top level element)! Is
there any solution except referencing this XSL directly from the XML
file?
I'm afraid I lost you slightly here ...
A key is indeed top-level --defined with global scope, from the viewpoint of
the source document(s) as well as the stylesheet... It is certainly possible
to use a key across multiple xml documents, if that's what you're worried
about.
Anyway, it's a bit difficult to see what the exact nature of the
puzzle/problem is, since the description breaks off after the xsl:param.
Does it add a condition of some sort you can incorporate in the key? Maybe
you can fiddle a bit with the key's match- or use-pattern in order to solve
this?
Cheers,
Andreas
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list