Kasimier T. Buchcik | 5c68274 | 2005-07-23 21:28:30 +0000 | [diff] [blame] | 1 | <?xml version="1.0"?> |
| 2 | <!-- |
| 3 | Content model error: |
| 4 | |
| 5 | any-err-not-determinist-1.xsd:29: element complexType: Schemas parser error : |
| 6 | local complex type: The content model is not determinist. |
| 7 | |
| 8 | As per Xerces and XSV this schema is OK. |
| 9 | |
| 10 | The problem appears when the maxOccurs of <bar> is greater than |
| 11 | the one of the <any> wildcard. Additionally if both are "unbounded". |
| 12 | If the latter is a different issue we should add an explicit test |
| 13 | for it. |
| 14 | |
| 15 | Examples: |
| 16 | <bar> <any> result |
| 17 | 2 1 error |
| 18 | 2 2 OK |
| 19 | 1 2 OK |
| 20 | unbounded 2 error |
| 21 | unbounded unbounded error |
| 22 | 2 unbounded OK |
| 23 | --> |
| 24 | |
| 25 | <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" |
| 26 | targetNamespace="urn:test:foo" |
| 27 | elementFormDefault="qualified"> |
| 28 | <xs:element name="foo"> |
| 29 | <xs:complexType> |
| 30 | <xs:sequence> |
| 31 | <xs:element name="bar" maxOccurs="2"/> |
| 32 | <xs:any namespace="##other" maxOccurs="1" processContents="lax"/> |
| 33 | </xs:sequence> |
| 34 | </xs:complexType> |
| 35 | </xs:element> |
| 36 | </xs:schema> |