Subject: AW: AW: [xsl] select 1st occurence of element tag name From: Nikolas.Nehmer@xxxxxxxxxxx (Nikolas Nehmer) Date: Mon, 16 Feb 2004 19:05:48 +0100 |
Problem is solved. Didn't consider using keys across several Documents ;-) Thanks, Nick |-----Ursprüngliche Nachricht----- |Von: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx [mailto:owner-xsl- |list@xxxxxxxxxxxxxxxxxxxxxx] Im Auftrag von Andreas L. Delmelle |Gesendet: Montag, 16. Februar 2004 18:09 |An: xsl-list@xxxxxxxxxxxxxxxxxxxxxx |Betreff: RE: AW: [xsl] 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 XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: AW: [xsl] select 1st occurence , Andreas L. Delmelle | Thread | [xsl] ANN: nxslt (.NET XSLT Command, Oleg Tkachenko |
RE: AW: [xsl] select 1st occurence , Andreas L. Delmelle | Date | [xsl] Attribute/Variable syntax asy, Willink, Ed |
Month |