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

RE: key based on items across several documents

Subject: RE: key based on items across several documents
From: "Paul Kiel" <paul@xxxxxxxxxxxxxxx>
Date: Sun, 19 Oct 2008 19:07:12 -0400
RE:  key based on items across several documents
As I suspected.  Thanks so much for your lightning fast response on a Sunday
night no less (neither of us should be working at this hour).  I can do what
I want using templates and grouping but I was looking for a potential
performance boost using keys.  

Paul Kiel

-----Original Message-----
From: Michael Kay [mailto:mike@xxxxxxxxxxxx] 
Sent: Sunday, October 19, 2008 6:30 PM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: RE:  key based on items across several documents

This can't be done, I'm afraid. The result of calling key() will only
contain nodes in the same document as the context node or (in XSLT 2.0 with
the 3-argument form of the function) in the subtree rooted at the node
supplied as the third argument. Yes, your match pattern is invalid too, both
in 1.0 and 2.0, but that's not the essence of the problem.

Michael Kay

> -----Original Message-----
> From: Paul Kiel [mailto:paul@xxxxxxxxxxxxxxx] 
> Sent: 19 October 2008 23:18
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject:  key based on items across several documents
> Greetings all,
> I am trying to create a key based on items across several 
> documents.  Here is a simplified version of what I'd like to do:
> 	<xsl:key name="ItemsWithName" match="$ItemFiles//item[@name]"
> use="@name"/>
> Creates a list of all <item>s that have an @name attribute, 
> across several documents (The ItemFiles variable gathers 
> nodes across documents based on input).  But it looks like I 
> can't use variables in the match pattern part of the key 
> element.  I knew this was true in xslt 1.0, having wanted to 
> do this years ago, but also seems to be the case in xslt 2.0 
> as well.  Have I been staring at this too long, or is there a 
> way to do this that I'm not thinking of in xslt 2.0?
> Thanks in advance,
> Paul Kiel

No virus found in this incoming message.
Checked by AVG - http://www.avg.com 
Version: 8.0.173 / Virus Database: 270.8.1/1732 - Release Date: 10/18/2008
6:01 PM

Current Thread


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.
First Name
Last Name
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.