BizTalk Utilities CV ,   Jobs ,   Code library
 
Home Page


Add/Edit your code items
Search the code library
Browse for the code library


XSLT
Grouping using xsl:key and the key() function -- the Muenchian method
Comparing Strings in XSLT for greater/less
How to do a search and replace in XSLT
How to work with more than one xml document in your XSLT transformation
Sorting (advanced) of dynamically constructed strings
In case you need a ""break"" from an xsl:for-each loop
Format XML/XSL for Documentation
Find all xsl:variables that are in scope?
Binary Search in XSLT
Get the newest 5 articles out of hundreds -- a super efficient sort in XSLT
Dynamically change the encoding of your XSLT stylesheet
Identifying an attribute or a namespace node
Build a XPath expression for a node
Avoiding an XSLT Processor crash due to deep recursive processing
Conditional generation of a string in a single XPath expression
Re: Re: ABS function implemented as a single XPath expression
Re: ABS function implemented as a single XPath expression
ABS function implemented as a single XPath expression
XML to HTML text editor
Dynamically Selecting Which Element To Sort On Using Parameters


 
 

<< XQuery.NET and XML >>


By Dimitre Novatchev
First Posted 12/03/2007
Times viewed 476

Intersection and other set operations on node-sets


Summary This snippet describes how to use the "Kaysian method" to express the intersection of two node-sets in pure XPath.

The only set operation provided in XSLT is the Union -- and it can be specified using the XPath and XSLT union operator |.

Until recently it was believed that in order to implement other types of set operations (e.g. intersection) one could only resort on using extension functions -- and different XSLT processors provided such extensions (e.g. saxon:intersection).

As it turned out in June 2000, it is possible to express the intersection of two node-sets in pure XPath. This technique was discovered by Michael Kay and is known as the Kaysian method.

Additional information

Further additional information


Rate this article on a scale of 1 to 10 (0 votes, average 0)

Your vote :  

<< XQuery.NET and XML >>





Leave a comment for this article
Your name
Your email (optional)
Your comment
Optional: Upload an attachment
Enter the code shown:

 
 

    Email TopXML