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

Re: Merging and Quines

Subject: Re: Merging and Quines
From: Jeni Tennison <mail@xxxxxxxxxxxxxxxx>
Date: Mon, 14 Aug 2000 19:00:36 +0100
Re: Merging and Quines
Oliver,

>By the way: thinking about keys ...
>Is it true that defining a key will always index into the *whole* document?
>So if I want to compare two arbitrary node sets (given in two variables)
>this is no use case for keys, is it?

Keys index into any nodes that they match in the document that the current
node is in.  You could define a key that only indexed into a portion of the
document by making the match attribute only match that portion of the
document, but you can't dynamically change the portion of the document that
they index into.

I haven't tested this and it may or may not be relevant to what you were
after, but it might be possible to do something like:

  key('keyname', 'keyvalue')[generate-id() = generate-id($node-set1)]

i.e. return the nodes that the key returns that are in $node-set1, or:

  count(key('keyname', 'keyvalue') | $node-set1) != 
    count(key('keyname', 'keyvalue')) + count($node-set1)

returning true if there any nodes returned by the key that are also in
$node-set1.

Can you give a more concrete example of what you're after?

Cheers,

Jeni

Jeni Tennison
http://www.jenitennison.com/


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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.