Subject: [xsl] Keys working on nodeset? From: Ragulf Pickaxe <ragulf.pickaxe@xxxxxxxxx> Date: Mon, 25 Jul 2005 13:23:37 +0200 |
Hi all, I am working with keys where I get some input from a database. I want to know if the following is possible. I have done some test with input file, but in actual application the input will be passed as a nodeset like below. I have only found references to using keys on different documents, I haven't been able to find references for keys on nodesets - did I not look properly, or is this indeed not possible? <?xml version="1.0" encoding="iso-8859-1" ?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:param name="Input" select="''"/> <xsl:key name="key-test" match="Something" use="some-attribute"/> <xsl:template match="/"> <xsl:for-each select="$Input/Root-element"> <xsl:for-each select="key('key-test',Something/@some-attribute)"> Do something </xsl:for-each> <xsl:for-each> </xsl:template> </xsl:stylesheet> If this is not possible, then it falls back to the question I had a couple of weeks ago, which Michael Kay answered, on how to transform one document with multiple extra documents, all generated in memory/from a database. This in .NET. (MK answered that I should pass on a nodeset, which is what I plan to, if the above will work). Thank you very much, Ragulf Pickaxe
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Copy element referenced to, Taco Fleur \(@DataBr | Thread | RE: [xsl] Keys working on nodeset?, Andrew Welch |
[xsl] Isolate spezial text term wit, KrustyDerClown | Date | Re: [xsl] Can't solve the following, John Robb |
Month |