I do not know how to tell xerces to not follow a dtd. Note that a dtd does not only have validity stuff, but it can also define entities so turning of validation does not have to mean do not look at the dtd.
I ran into a similar problem at work, and could be be bothered to figure out what magic I need to do to tell xerces not to follow the DTD, so I wrote a DtdFilter to filter out the DTD <!DOCTYPE> from the input string. Peter On 12/19/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
Quoting [EMAIL PROTECTED]: > 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"> <path> <fileset casesensitive="false" dir="." id="xml.files" includes="**/*.xml" /> </path> <sequential> <jing rngfile="wellformed.rng" file="@{file}" failonerror="false" /> </sequential> </for> 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]