Re: [xml] Schema validation bug



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.

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

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?

Regards,
Alexey Sarytchev.




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