Re: [xml] Schema validity failure for valid document



On Fri, 2004-12-31 at 16:13 -0500, Scott Lawrence wrote:
I've attached a simplified version of a schema I'm working on and an
instance document that should validate against it.  I can't seem to
figure out how to get 'xmllint -schema' to accept this.  

I figured this out, and found a validator that (correctly) rejects it.  

This was valid:
  <call>
    <dialog>
      <from_tag> ... </from_tag>
      <to_tag> ... </to_tag>
    </dialog>
    <to> ... </to>
    <from> ... </from>
  </call>

but I had swapped the <to.../> and <from ... /> tags inside <call>.  The
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).

-- 
Scott Lawrence
Consulting Engineer
Pingtel Corp.
http://www.pingtel.com/
+1.781.938.5306 x162





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