Re: [xml] xmllint -valid versus -postvalid

On Wed, Dec 08, 2004 at 10:53:32AM -0800, Bob Stayton wrote:
I have an XML file that uses SYSTEM entities, and it validates when I use
"xmllint -valid" but that fails validation when I use "xmllint -postvalid".
I get:

validity error : IDREF attribute linkend references an unknown ID "foo"

The ID being referenced is in a SYSTEM entity that is pulled into the file
with an entity reference, and the IDREF is in the main file.  If I manually
resolve all of the entities, then indeed the file is valid with both -valid
and -postvalid.

So what is the difference between -valid and -postvalid when no XIncludes

  -valid     implements the DTD validation as defined by the XML spec.
  -postvalid run the validation code on an existing tree. If the existing tree
             does not have all the bits needed for the validation you will get

  only -valid is claimed to be conformant to the XML spec. -postvalid 
may be used if you know the limitations. For example -postvalid may not try to
fetch external parsed entities, because those are fetched at parsing
time and only if required.


Daniel Veillard      | Red Hat Desktop team
veillard redhat com  | libxml GNOME XML XSLT toolkit | Rpmfind RPM search engine

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