Hello Everyone, I am fairly new to xml and xslt/xpath, but I am hoping someone can help me with the following problem:
I have a software system that accepts a query and returns an xml file. I want to be able to use xslt to create an html table from the elements in the xml file. I have no control over the format of the xml file that is returned by the software system. In a nutshell, the information returned is file names and file descriptions located in a folder. If there is a single file in the folder, the xml file will have a format of something like this:
<root>
<path>\\someserver\someshare\
<folder>Folder 1
<files>File1.pdf</files>
<descrs>File 1 Description</descrs>
</folder>
</path>
</root>
When there are multiple files in the folder, the xml file will have a format of something like this:
<root>
<path>\\someserver\someshare\
<folder>Folder 1
<files>
<v1>File1.pdf</v1>
<v2>File2.pdf</v2>
<v3>File3.pdf</v3>
<v4>File4.pdf</v4>
</files>
<descrs>
<v1>File 1 Description</v1>
<v2>File 2 Description</v2>
<v3>File 3 Description</v3>
<v4>File 4 Description</v4>
</descrs>
</folder>
</path>
</root>
What I need to do is associate (or match) each file with its corresponding file description...and that is where I am getting lost. My desired html table would have the format of:
COL1 COL2 COL3
Path value File 1 name File 1 description
Path value File 2 name File 2 description
Path value File 3 name File 3 description
Path value File 4 name File 4 description
Any help would be greatly appreciated.
Thanks,
Kenny