|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: AW: select 1st occurence of element tag name
> -----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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








