Subject: RE: [xsl] RE: Muenchian technique, was (Keys on multiple element types) From: DPawson@xxxxxxxxxxx Date: Tue, 5 Feb 2002 14:09:59 -0000 |
Thanks Jeni, very clear as always. > >> *[generate-id(.) = generate-id(key('rows', name)[1])] > The reason I usually include the [1] when I'm explaining this method > of accessing unique values is that it flows naturally from the test > that you're doing. What you're doing is comparing the context node > with the first node returned by the key. If you translate into the set > logic expression it would be: > > count(. | key('rows', name)[1]) = 1 > So in general if you're trying to assess whether two nodes are the > same, it's important to pull out the two nodes individually. The only > reason that you can get away with *not* using the [1] if you're using > the generate-id() method of comparing nodes is because generate-id() > automatically looks at only the first node in the node set. Am I right in thinking that 'the first node in the node-set' in the para above, means the first node for which the predicate is true? I had this last week with $variable[generate-id(.) = generate-id(key('rows', name)[1])] so here the ndl in $variable is 'searched' for the first node for which the predicate is true? Then returned as the value of the expression? I think its more a case of me getting my head round what's happening rather than it being hard :-) Thanks Jeni. Regards DaveP - NOTICE: The information contained in this email and any attachments is confidential and may be legally privileged. If you are not the intended recipient you are hereby notified that you must not use, disclose, distribute, copy, print or rely on this email's content. If you are not the intended recipient, please notify the sender immediately and then delete the email and any attachments from your system. RNIB has made strenuous efforts to ensure that emails and any attachments generated by its staff are free from viruses. However, it cannot accept any responsibility for any viruses which are transmitted. We therefore recommend you scan all attachments. Please note that the statements and views expressed in this email and any attachments are those of the author and do not necessarily represent those of RNIB. RNIB Registered Charity Number: 226227 Website: http://www.rnib.org.uk 14th June 2002 is RNIB Look Loud Day - visit http://www.lookloud.org.uk to find out all about it. XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Re: Xselerator, Dimitre Novatchev | Thread | Re: [xsl] RE: Muenchian technique, , Jeni Tennison |
Re: [xsl] RE: (Keys on multiple ele, Ahmad J. Reeves | Date | RE: [xsl] RE: Muenchian technique, , DPawson |
Month |