Mark Wilson I am the creator of TopXML. I am available for international and local (Australia) contracts. I am a Solution Architect/Business Analyst. I have worked in IT in several countries (NZ, Australia, South Africa, UK) building and training teams for government and very large non-governmental organizations. I am ex-Microsoft Consulting Services. I wrote the first book on Microsoft XML published in 2000 called XML Programming with VB and ASP. Most recently I have been building tools for the SEO industry. Ask me for a 37 point SEO health-checkup for your website.
This example shows how you can compare and combine the results in different node-sets.
Using the union operator (|) two or more sets can be combined to one set (the nodes that
occur in both sets should occur only once in the resulting conbination). Using this combining
of node-sets, we can also find the intersection of two node-sets: the technique to do this
was presented by Michael Kay and is shown in this example.
Stranger in a strange land0441788386230000Starman Jones0345328116 80000The Space Merchants02352123456 120000RobertHeinleinCyrilKornbluthFrederickPohlJudy-LynDel Rey
XSLT code:
Total number of books by Robert Heinlein:
Total number of books by several authors:
Number of books in the union of the two sets
Number of books in the intersection of the two sets
Total number of books by Robert Heinlein: 2
Total number of books by several authors: 2
Number of books in the union of the two sets 3
Number of books in the intersection of the two sets 1
Total number of books by Robert Heinlein: 2
Total number of books by several authors: 2
Number of books in the union of the two sets 3
Number of books in the intersection of the two sets 1
Total number of books by Robert Heinlein: 2
Total number of books by several authors: 2
Number of books in the union of the two sets 3
Number of books in the intersection of the two sets 1
Total number of books by Robert Heinlein: 2
Total number of books by several authors: 2
Number of books in the union of the two sets 3
Number of books in the intersection of the two sets 1
Total number of books by Robert Heinlein: 2
Total number of books by several authors: 2
Number of books in the union of the two sets 3
Number of books in the intersection of the two sets 1
Note: You can now download the full content of the XPath reference, the XSLT reference and the
DOM reference in one PDF document. This document contains the implementation tables, internal
links to navigate through the references, a full linked table of contents. You can use free text
search through the whole reference or print as a nicely formatted document.
Download here...