[
http://issues.apache.org/jira/browse/XERCESJ-1081?page=comments#action_12316530
]
Paul V. Biron commented on XERCESJ-1081:
----------------------------------------
I had sent the following reply in email on 20050627 but I see it didn't make it
into JIRA.
No, it's not an invalid content model (schema allows the definition of
unsatisfiable types, e.g., an int with pattern "a-z+"). NO instances
should
be valid against it...and xerces-j 2.6.2 is reporting that there ARE
valid
instances. That's the problem.
Ask Sandy, he knows this is a problem and he actually told me to submit
the bug report.
pvb
> empty choices are validating
> ----------------------------
>
> Key: XERCESJ-1081
> URL: http://issues.apache.org/jira/browse/XERCESJ-1081
> Project: Xerces2-J
> Type: Bug
> Components: XML Schema Structures
> Versions: 2.6.2
> Environment: win2k sp4, sun jvm 1.5.0_01-b08
> Reporter: Paul V. Biron
>
> According to "Validation Rule: Element Sequence Valid" (cvc-model-group) a
> content model with an empty choice should not be matched by ANY instance
> fragment. The following schema and instance documents that show that xerces
> 2.6.2 does not correctly deal with empty choices in content models as it says
> the following instance document is valid.
> <!-- emptyChoice.xsd -->
> <xs:schema
> xmlns:xs='http://www.w3.org/2001/XMLSchema'>
> <xs:complexType name='emptyChoice'>
> <xs:choice minOccurs='1'/>
> </xs:complexType>
> </xs:schema>
> <!-- emptyChoice.xml -->
> <root
> xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
> xsi:noNamespaceSchemaLocation='emptyChoice.xsd'
> xsi:type='emptyChoice'/>
> c:>java sax.Counter -s -v -f emptyChoice.xml
> emptyChoice.xml: 641 ms (1 elems, 2 attrs, 0 spaces, 0 chars)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]