[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] 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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|