5 messages in net.sourceforge.lists.saxon-helpRe: [saxon] Xpath comparing sequences
FromSent OnAttachments
Ryan PuddephattAug 8, 2008 2:22 pm 
Bordeman, ChrisAug 8, 2008 2:58 pm 
Michael KayAug 8, 2008 3:06 pm 
Andrew WelchAug 9, 2008 3:12 am 
Michael KayAug 9, 2008 9:12 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: [saxon] Xpath comparing sequencesActions...
From:Andrew Welch (andr@gmail.com)
Date:Aug 9, 2008 3:12:18 am
List:net.sourceforge.lists.saxon-help

I have two sequences in xpath let's say 1,2,3 and 2,3,4 and I need to get the
items that exist in both, in this case 2,3

I'm sure there is a xpath 2.0 function to do this but I cannot anything

No need for an actual function, it's just a set comparison

(1, 2, 3)[. = (2, 3, 4)]

returns the sequence (2, 3)

Maybe have a look at:

http://ajwelch.blogspot.com/2007/08/when-b-and-b-both-return-true.html