ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 14641] - Prototypical <schemavalid> task that uses Xerces-J 2.2.1 to validate an XML file against it's Schema (XSD)
Date Mon, 18 Nov 2002 16:46:42 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14641>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14641

Prototypical <schemavalid> task that uses Xerces-J 2.2.1 to validate an XML file against
it's Schema (XSD)





------- Additional Comments From ddevienne@lgc.com  2002-11-18 16:46 -------
Usage example:

  <target name="validate" depends="init, -buildmagic"
          description="Ensure dependencies.xml is valid against its schema">
    <schemavalid file="dependencies.xml" />
  </target>

Can also take a nested <fileset> in addition to the 'file' attribute.

Here's an example output of a schema error (task is silent without errors):

P:\com_lgc\tahoe\modules>build validate
Buildfile: P:\com_lgc\tahoe\modules\build.xml

validate:
dependencies.xml:10:11:cvc-complex-type.2.4.a: Invalid content starting with 
element 'dummy'. The content must match '(("":description){0-1},("":project){1-
UNBOUNDED})'.

BUILD FAILED
file:P:/com_lgc/tahoe/modules/build.xml:75: org.xml.sax.SAXParseException: cvc-
complex-type.2.4.a: Invalid content starting with element 'dummy'. The content 
must match '(("":description){0-1},("":project){1-UNBOUNDED})'.

Total time: 2 seconds

--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message