XML file one could have 1000 - 6000 forms; XML file two could have one to 100 or more. I want to replace any identical form in file one with file two. If it exists in file 2 but not in file one I want to add it to file 1. After the files are merged I want to run it against my XSLT. I am using a 2.0 stylesheet and a Saxon parser.
File 1:
<Forms>
<Form name="fred" date="10/01/2008"/>
<Form name="barney" date="12/31/2009"/>
<Form name="wilma" date="12/31/2010"/>
</Forms>
File 2:
<Forms>
<Form name="barney" date="01/31/2010"/>
<Form name="betty" date="6/31/2009"/>
</Forms>
Merged file should look like:
<Forms>
<Form name="fred" date="10/01/2008"/>
<Form name="barney" date="01/31/2010"/>
<Form name="wilma" date="12/31/2010"/>
<Form name="betty" date="6/31/2009"/>
</Forms>