Re: [xml] xmllint -valid versus -postvalid
- From: Daniel Veillard <veillard redhat com>
- To: Bob Stayton <bobs sagehill net>
- Cc: xml gnome org
- Subject: Re: [xml] xmllint -valid versus -postvalid
- Date: Wed, 8 Dec 2004 16:50:45 -0500
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
failures
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
--
Daniel Veillard | Red Hat Desktop team http://redhat.com/
veillard redhat com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]