How can I combined several similar xml files and eliminate duplicates, sort the result, index them?
If you have many glossaries or catalogs prepared by different people, but with the same format, and you want to combine them, eliminate duplicates, and sort the result. You will even want to index them. How do we get there? • Use xsl document() function to access external files • Copy the contents back by using xsl:copy-of • Combine all the contents into a treefragment, and assign it to a variable • Convert the treefragment to a node-set by using vendor specific extensions. Xalan is used here • Sort the result node-set, convert it to a new treefragment • Convert the new treefragment to a node-set by using the vendor specific extensions again • Index the result, and display the result into html or xhtml Here is the Tranformation result. See this first, then you know what are we talking about. Here is the XML source, Data files, XSL source. You will like it!