TIBCOSoftware / genxdm

GenXDM: XQuery/XPath Data Model API, bridges, and processors for tree-model neutral access to XML.
http://www.genxdm.org/
9 stars 4 forks source link

Invalid report of cyclic model group during schema parse #154

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Cycle checks for model groups should exclude the contents of element particles. 
 See the this discussion: 
http://lists.w3.org/Archives/Public/xmlschema-dev/2002May/0008.html.

Original issue reported on code.google.com by joe.bays...@gmail.com on 11 Jul 2014 at 3:46

GoogleCodeExporter commented 9 years ago
In XMLSchemaConvert.convertModelGroups, we now create the ModelGroup and add it 
to the m_outBag (a ComponentBag) <em>prior</em> to processing the particles of 
the aforementioned modelGroup.  This way, when a particle encounters the 
ModelGroup in the m_outBag, it won't try to re-create it; it'll just use the 
one in the m_outBag.  Also, we must clear the m_cycles.groups prior to 
processing an Element particle; then we restore m_cycles.groups after 
processing that element particle.

Original comment by joe.bays...@gmail.com on 11 Jul 2014 at 3:49

GoogleCodeExporter commented 9 years ago
Fix made at r512.

Original comment by joe.bays...@gmail.com on 11 Jul 2014 at 3:50