Re: [xml] Schema validation bug



On Fri, Jan 30, 2004 at 06:47:39PM -0500, Alexey Sarytchev wrote:
I did some more debugging, it looks like the problem is with a
ContentModel, whatevere it is, built for 'all' group in a schema.

Function xmlSchemaBuildAContentModel() for type XML_SCHEMA_TYPE_ALL
first calls xmlAutomataNewCountTrans() for all optional elements,
and then xmlAutomataNewAllTrans()

It looks like xmlAutomataNewAllTrans() needs some counters for 
transition to work, but xmlAutomataNewCountTrans() doesn't create any.

So we get 2 states - the first one has type XML_REGEXP_TRANS_STATE
and the second one is the final - XML_REGEXP_FINAL_STATE.

We always sit at the first state and should get to the second at the end 
of input, but we need a counter for that. So we never get to the final 
state.

  okay, can you log this in bugzilla too ?

Sorry if it's not clear, I don't understand the code very well.

  it's not simple really... I don't remember well either.

E.g., there are 3 functions:
xmlAutomataNewCountTrans()
xmlAutomataNewCountedTrans()
xmlAutomataNewCounterTrans()

What are they, what's the difference between them? It looks like we need 
one of them, but which one? BTW, xmlAutomataNewCountTrans() is used in 
only one place, is it specific for that 'all' group in schemas?

  one of them create a transition where min and max are provided

  another create a transition where one can exit on a counter value
  the last one create a transition which increment a counter value

 it's not trivial :-)

Daniel


-- 
Daniel Veillard      | Red Hat Network https://rhn.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]