xsl-list
[Top] [All Lists]

Keys working on nodeset?

2005-07-25 04:23:37
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

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



<Prev in Thread] Current Thread [Next in Thread>