ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ivan Ivanov <rambiusparkisan...@yahoo.com>
Subject Re: Capturing XML validation output
Date Mon, 11 Jul 2005 00:15:21 GMT
Yaakov,

I think that you can use <xmlvalidate>[1] task for
validation of your xml files and <record> task to
capture the output of the validation (untested but
might give you an idea):

<record name="dtdOutput.txt" action="start">
<xmlvalidate file="filename.xml">
  <dtd publicId="..." location="filename.dtd"/>
</xmlvalidate>
</record>

HTH Ivan

[1]http://ant.apache.org/manual/OptionalTasks/xmlvalidate.html
[2]http://ant.apache.org/manual/CoreTasks/recorder.html

--- Yaakov Chaikin <yaakov.chaikin@gmail.com> wrote:

> Hi,
> 
> Could someone point me in the right direction on the
> following...
> 
> I have these directories:
> 
> root
>   project1
>   project2
>   project3
> ...
> 
> Each project contains XML file declared with a DTD,
> the DTD file, XML
> file declared with a Schema, the Schema file.
> 
> What I would like to get ANT to do is to validate
> both XML files and
> capture the output of any errors inside 2 files:
> dtdOutput.txt and
> schemaOutput.txt. Each file should be placed
> alongside the
> XML/DTD/Schema file(s), so the file with the output
> file of the set of
> files would be in the same directory as those files.
> 
> Any direction on this would be appreciated.
> 
> Thanks,
> Yaakov.
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> user-unsubscribe@ant.apache.org
> For additional commands, e-mail:
> user-help@ant.apache.org
> 
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message