ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Donald <dona...@apache.org>
Subject Re: [SUBMIT] xml validation task
Date Tue, 10 Apr 2001 04:50:18 GMT
Thanks - added in.

At 07:05  23/3/01 +0100, Raphael PIERQUIN wrote:
>Hi, 
>
>Attached is a task that checks xml files are valid (or
>only well formed).
> 
>The task uses crimson SAX2 parser implementation by default,
>but one can specify any SAX1/2 parser if needed :
>
>    <xmlvalidate file="toto.xml"/>
>
>    <xmlvalidate failonerror="no" lenient="yes" warn="yes"
>	         classname="org.apache.xerces.parsers.SAXParser" >
>	         classpath="lib/xerces.jar">
>        <fileset dir="src" includes="style/*.xsl"/>  
>    </xmlvalidate>
>
>Supported properties/subelements are :
>
>- file/embedded fileset : the file(s) you want to check
>
>- lenient : if true, only check the xml document is well formed
>	    (ignored if the specified parser is as SAX1 parser)
>
>- classname : the parser to use. (default: crimson)
>
>- classpathref/embedded classpath : where to find the parser class
>
>- failonerror : try and guess... (default: true)
>
>- warn: if true, log parser warn events
>
>I don't know if the task should be optional or not, feel free
>to rename the package if you think it's worth shipping with ant.
>--
>Raphael PIERQUIN
>AGISphere S.A.
>raphael.pierquin@agisphere.com
>
>Attachment Converted: "g:\applications\eudora\attach\XMLValidateTask.java"
>
Cheers,

Pete

*-----------------------------------------------------*
| "Faced with the choice between changing one's mind, |
| and proving that there is no need to do so - almost |
| everyone gets busy on the proof."                   |
|              - John Kenneth Galbraith               |
*-----------------------------------------------------*


Mime
View raw message