[vox-tech] complex XML to CSV via XSLT

Dylan Beaudette debeaudette at ucdavis.edu
Wed Jul 14 11:40:35 PDT 2010


Hi,

I have an XML file generated via PHP, and containing the contents of several 
linked tables from a relational database. I would like to generalize some 
sample XSLT documents to convert the entire file into a sequence of CSV 
files. The XML file will essentially be exploded back into a set of CSV 
files, one for each of the original tables. The idea would be to create a 
couple XSLT files for converting the XML format into several possible output 
formats. 

Attached is the XML file, as well as two XSLT files. I suppose that I could 
loop over the tables of interest, and apply separate XSLT files to the 
original XML-- saving to different output files each time. It would be more 
convenient to have all of that logic embedded in the XSLT file-- if possible.

Any ideas?

Cheers,
Dylan


-- 
Dylan Beaudette
Soil Resource Laboratory
http://casoilresource.lawr.ucdavis.edu/
University of California at Davis
530.754.7341
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pedons.xml
Type: text/xml
Size: 17375 bytes
Desc: not available
Url : http://lists.lugod.org/pipermail/vox-tech/attachments/20100714/b3413286/attachment.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pedon-xml-description.xsl
Type: text/x-xslt
Size: 933 bytes
Desc: not available
Url : http://lists.lugod.org/pipermail/vox-tech/attachments/20100714/b3413286/attachment-0001.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pedon-xml-horizon.xsl
Type: text/x-xslt
Size: 947 bytes
Desc: not available
Url : http://lists.lugod.org/pipermail/vox-tech/attachments/20100714/b3413286/attachment-0002.bin 


More information about the vox-tech mailing list