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

Allow content models w/conflicts between wildcards and elements. Then, choose the element. #143

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
We raise validation errors against instances governed by schemas which do not 
conform to the XSD schema 1.0 spec's prohibition against competing element and 
wildcard particles:   http://www.w3.org/TR/xmlschema-1/#non-ambig.  A more 
specific use case is when a content model contains an optional element followed 
by a wildcard w/an ##any namespace attribute.

However, such schemas are valid in the XML schema 1.1 spec:  
http://www.w3.org/TR/xmlschema11-1/#cos-nonambig.  I think it'd behoove us to 
allow such content models.

Original issue reported on code.google.com by joe.bays...@gmail.com on 7 Oct 2013 at 6:53

GoogleCodeExporter commented 9 years ago
r477. Fixed tree produced by NfaCompiler so that when validating optional ALL 
groups, we do not encounter an end state before we encounter the ALL group.  
Also, fixed SmMachineImpl to return the element particle when it detects 
competing element and wildcard; previously, we returned whichever one was 
matched first.

Original comment by joe.bays...@gmail.com on 8 Oct 2013 at 6:39