Re: [xml] xmlValidCtxt.error called, but not invalid?

Date view Thread view Subject view Author view

From: Daniel Veillard (Daniel.Veillard@w3.org)
Date: Tue Nov 07 2000 - 07:50:57 EST


On Mon, Nov 06, 2000 at 10:35:59PM -0500, Harry Blundell wrote:
>
> Hi folks,
>
> I have a document with an element with a missing required attribute.
>
> When parsing with validation, or post-validating, I get the
> xmlValidCtxt.error function called, with an error like
>
> Element x doesn't carry attribute y
>
> but the xmlParserCtxtPtr.valid flag doesn't get unset (in the case of
> parsing while validating; when post-validating, I get 1 returned by
> xmlValidateDocument).
>
> I had a look at the code, and see where the error message comes from, but
> don't see where the document is marked invalid. Am I missing something,
> or is there some reason that this behaves this way?

  No, you're right, it's a bug :-), the enclosed patch should fix it.

  thanks,

Daniel

-- 
Daniel.Veillard@w3.org | W3C, INRIA Rhone-Alpes  | libxml Gnome XML toolkit
Tel : +33 476 615 257  | 655, avenue de l'Europe | http://xmlsoft.org/
Fax : +33 476 615 207  | 38330 Montbonnot FRANCE | Rpmfind search site
 http://www.w3.org/People/all#veillard%40w3.org  | http://rpmfind.net/


----
Message from the list xml@rpmfind.net
Archived at : http://xmlsoft.org/messages/
to unsubscribe: echo "unsubscribe xml" | mail  majordomo@rpmfind.net


Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Tue Nov 07 2000 - 09:43:39 EST