I want to use XSLT to transform a set of documents into one structure. I have the transformation working correctly to concatenate the documents. I don't know, however, whether the the documents have duplicate entries in them, which I will need to remove.
I need to know how to remove these duplicates (if they exist) by an id attribute. All duplicates will have the same id. I know it will have something to do with keys and generate-id functions.
<root>
<item id="1001">A</item>
<item id="1003">C</item>
<item id="1004">D</item>
<item id="1002">B</item>
<item id="1001">A</item>
<item id="1003">C</item>
<item id="1004">D</item>
<item id="1005">E</item>
</root>
I need an XSLT 1.0 transformation for the above, based on the following...
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
Also, would someone be able to explain how it works to me too? Bit of a noob...
Thanks in advance...