ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Re: xmlvalidate: check for well-formedness *only*
Date Tue, 19 Dec 2006 16:20:57 GMT

> any progress or workaround on that (for ant stable 1.6.5)?

i've got this working, but at a snail's pace... not surprising since the
following is rather io intensive (as well as unidiomatic):

  <taskdef resource="net/sf/antcontrib/antlib.xml"/>
  <taskdef name="jing" classname="com.thaiopensource.relaxng.util.JingTask" />
  <for param="file">
      <fileset casesensitive="false"

      <jing rngfile="wellformed.rng" file="@{file}" failonerror="false" />

you'll notice 2 optional tasks:

- jing for an alternate well-formedness checker (specified in the relax-ng
file wellformed.rng). also using the undocumented jing attribute failonerror
here, to stop jing from failing the build. however, just like xmlvalidate, it
stops processing after the first problem anyway, so we can't use a nested
fileset, but:

- antcontrib and the <for> task to iterate over the lot

i've got 400 xml files, and this took just short of 5 minutes, so about 1
second per file. xmllint did it near instantly.

still hoping to hear of a better solution. anyone?

- p

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message