Subject: Re: Merging and Quines From: Jeni Tennison <mail@xxxxxxxxxxxxxxxx> Date: Mon, 14 Aug 2000 19:00:36 +0100 |
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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: Merging and Quines, Oliver Becker | Thread | Re: Merging and Quines, Paul_Dick |
Re: Embedding HTML Doc into XSL or , Mike Brown | Date | Line Numbering, Darrin Bishop |
Month |