Re: [xml] problem validating XML file with DTD

On Fri, Jan 27, 2006 at 05:53:06PM -0800, Sean Machin wrote:
"parse2.c" from the example code.  It failed with an error:
camera_test.xml:65: validity error : Content model of rule is not 
determinist: ((input | (input , (operator , input)+)) , output+)

I'm using version 2.6.23.
<!ELEMENT rule ( (input|(input,(operator,input)+)),output+) >

  Violates the following:

"The content of an element matches a content model if and only if it is possible to trace out a path through 
the content model, obeying the sequence, choice, and repetition operators and matching each element in the 
content against an element type in the content model. For compatibility, it is an error if the content model 
allows an element to match more than one occurrence of an element type in the content model."

is even clearer about the issue. The 'other tools' your reference are IMHO just
not conformant to the specification.

  Rewriting that part of the DTD to 
    (input, (operator,input)*, output+)
should fix it trivially, it just shows that the person who wrote the DTD don't
have much experience...


Daniel Veillard      | Red Hat
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]