any6_1.xsd 1.0 KB

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