[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Keys working on nodeset?

Subject: Keys working on nodeset?
From: Ragulf Pickaxe <ragulf.pickaxe@xxxxxxxxx>
Date: Mon, 25 Jul 2005 13:23:37 +0200
how keys working
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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.