XML Editor
Sign up for a WebBoard account Sign Up Keyword Search Search More Options... Options
Chat Rooms Chat Help Help News News Log in to WebBoard Log in Not Logged in
Show tree view Topic
Go to previous topicPrev TopicGo to next topicNext Topic
Postnext
poo sinSubject: append the output of the xquery to one file
Author: poo sin
Date: 05 Nov 2004 05:52 PM
Greetings!

Is there a way from command line to append the output in one file for stylusxql.exe

for example:

for %%a in (*.xml) do stylusxql.exe -out %%a.xsl -param fi=%%a sample.xquery

The above script runs the sample.xquery on all the *.xml files in the
directory and store the results in corresponding *.xsl files.

Can we output the results of the above xquery in one file - which
keeps appending.

For example,
for %%a in (*.xml) do stylusxql.exe -out sample.xsl -param fi=%%a sample.xquery
stores the result of the xquery executed on the last file


Thanks,
-pS

Postnext
(Deleted User) Subject: Re: append the output of the xquery to one file
Author: (Deleted User)
Date: 05 Nov 2004 06:08 PM
Hi,
the behavior of the -o option is to overwrite the file, if it exists. But
if you omit it, the result is printed to the stdout, that you can then
redirect to the final output, e.g.

for %%a in (*.xml) do stylusxql.exe -param fi=%%a sample.xquery >> final.xsl

Hope this helps,
Alberto


Posttop
poo sinSubject: Re: append the output of the xquery to one file
Author: poo sin
Date: 05 Nov 2004 06:21 PM
Thanks Alberto!

This saved my weekend :-)

 
Go to previous topicPrev TopicGo to next topicNext Topic
Download A Free Trial of Stylus Studio 6 XML Professional Edition Today! Powered by Stylus Studio, the world's leading XML IDE for XML, XSLT, XQuery, XML Schema, DTD, XPath, WSDL, XHTML, SQL/XML, and XML Mapping!  
go

Log In Options

Site Map | Privacy Policy | Terms of Use | Trademarks
Stylus Scoop XML Newsletter:
W3C Member
Stylus Studio® and DataDirect XQuery ™are from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2016 All Rights Reserved.