[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Creating csv from multiple input files
> So you could use > <xsl:apply-templates > select="collection('file:///C:/dir/subdir?select=*.xml')/*/*"/> > to process all child elements of all root elements of those .xml files in > the directory C:\dir\subdir. Thanks for the answer. Following your advice i modified my stylesheet like this: <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output name="csv" method="text" encoding="UTF-8"/> <xsl:template match="/"> <xsl:result-document format="csv" href="result.csv"> <xsl:apply-templates select="collection('data/input?select=*.xml')/*/*"/> <xsl:text>
</xsl:text> </xsl:result-document> </xsl:template> ... "data/input" is the path relative to my xslt where the input files resist. Now i wonder how i should run saxon9 from the command line. Saxon9 needs an input file, but now the input files are all defined inside the stylesheet. I was thinking of something like this: java -jar saxon9.jar xml2csv.xslt But this does not work due to the lack of an input file. Could you please help a bit further? Georg. P.S.: Meanwhile i will generate a simple shell script like Wendell suggested. That is the most obviously approach that i didn't thought of. Sometimes too much xslt makes me blind :-)
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|