Re: [xml] Schema validity failure for valid document
- From: Daniel Veillard <veillard redhat com>
- To: Scott Lawrence <slawrence pingtel com>
- Cc: xml gnome org
- Subject: Re: [xml] Schema validity failure for valid document
- Date: Mon, 3 Jan 2005 08:35:57 -0500
On Mon, Jan 03, 2005 at 08:11:17AM -0500, Scott Lawrence wrote:
xerces-c validation routines returned:
Error at file /home/lawrence/Work/libxml2/build/tmp/call_event_examples.xml, line 18, char 12
Message: Element 'from' is not valid for content model: '((dialog,to),from)'.
The xmllint error:
call_event_examples.xml:3: element call_event: Schemas validity error :
Element 'call_event' [CT local]: The element content is not valid.
isn't really informative enough (or wasn't for me, at least).
well, at the time of the error, all libxml2 had left from the Schemas
content model is a compiled automata. Sometimes that automata can be
reserialized as a string making sense to a human, we don't have an API for
this (yet that could be added). It's also sometime hard to find out what
exactly generated the error, seems the content model wrong is for an element
starting line 3 but the error shows up line 18.
Error reporting can certainly be improved, but it's usually not trivial to
provide back the "useful" information.
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]