I have a directory of XML files… for example:
result.xml
result2.xml
result3.xml
resultNth.xml (because there is an unknown amount of files)
the schema in each result file would be the same essentially
<Succeeded>
<someStrongXMLObject>
</someStrongXMLObject>
</Succeeded>
My Question is – can I include 1 additional XML File called results.xml in that directory… and an XSL file that will format the results…
I want to create a summary from all the result files… so that data from all these files will be included in the summary.
Is this possible? Without using any C# – just standard XML, XSLT?
Update
I don’t expect a solution, just a nod, yes its possible, or a resounding no.. I need to implement some C#. Also I would like the directory structure to be YYYY/MM/DD – so that I can have summary XML files, that will recurse thought sub directories… and create monthly and annual summaries.
Yes, it is definitely possible.
How easy it is will depend on how reliable your filename and folder name patters are. You can use the document() function to check for the presence of a result file. Use recursion to keep looking for the next sequentially named file until you reach the end.
From your example filenames, the following XSLT could be used:
I ran it with 3 result documents in the same folder as the XSLT(i.e. result.xml, result1.xml, result2.xml) and produced the following output: