Re: [xml] external DTD validation of large XML's

If the above are correct, what do you suggest to people who want to use libxml2 to validate large XMLs 
with external DTD files?  Re-write the input XML file?

Pretty much yeah. It's not so bad, just a tiny DOCTYPE refering to the DTD.

In many cases you don't even need that. Write a shell XML file,

<!DOCTYPE wrapper SYSTEM "the-dtd-file.dtd" [
  <!ELEMENT wrapper the-real-root-element>
  <!ENTITY the-real-document SYSTEM "bigfile.xml">

and then validate that wrapper file.

This assumes the large file has a root (outermost) element of


Liam Quin - XML Activity Lead, W3C,
Pictures from old books:

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]