derivation-ok-restriction-2-1-1_0.xsd 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <?xml version="1.0" encoding="ISO-8859-1"?>
  2. <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
  3. xmlns="http://FOO" targetNamespace="http://FOO">
  4. <xs:element name="foo">
  5. <xs:complexType>
  6. <xs:complexContent>
  7. <xs:restriction base="typeA">
  8. <xs:attribute name="barA_1" type="xs:string" use="optional"/>
  9. <!-- OK -->
  10. <xs:attribute name="barA_2" type="xs:string" use="required"/>
  11. <!-- OK -->
  12. <xs:attribute name="barA_3" type="xs:string" use="prohibited"/>
  13. <!-- OK -->
  14. <xs:attribute name="barB_1" type="xs:string" use="optional"/>
  15. <!-- 2.1.1 inconsistent ( OR 3 ) -->
  16. <xs:attribute name="barB_2" type="xs:string" use="required"/>
  17. <!-- OK -->
  18. <xs:attribute name="barB_3" type="xs:string" use="prohibited"/>
  19. <!-- 3 -->
  20. <xs:attribute name="barC_1" type="xs:string" use="optional"/>
  21. <!-- 2.2 no match in base -->
  22. <xs:attribute name="barC_2" type="xs:string" use="required"/>
  23. <!-- 2.2 no match in base -->
  24. <xs:attribute name="barC_3" type="xs:string" use="prohibited"/>
  25. <!-- OK -->
  26. <xs:attribute name="barD_1" type="xs:string" use="optional"/>
  27. <!-- 2.2 no match in base -->
  28. <xs:attribute name="barD_2" type="xs:string" use="required"/>
  29. <!-- 2.2 no match in base -->
  30. <xs:attribute name="barD_3" type="xs:string" use="prohibited"/>
  31. <!-- OK -->
  32. </xs:restriction>
  33. </xs:complexContent>
  34. </xs:complexType>
  35. </xs:element>
  36. <xs:complexType name="typeA">
  37. <xs:attribute name="barA_1" type="xs:string" use="optional"/>
  38. <xs:attribute name="barA_2" type="xs:string" use="optional"/>
  39. <xs:attribute name="barA_3" type="xs:string" use="optional"/>
  40. <xs:attribute name="barB_1" type="xs:string" use="required"/>
  41. <xs:attribute name="barB_2" type="xs:string" use="required"/>
  42. <xs:attribute name="barB_3" type="xs:string" use="required"/>
  43. <xs:attribute name="barC_1" type="xs:string" use="prohibited"/>
  44. <xs:attribute name="barC_2" type="xs:string" use="prohibited"/>
  45. <xs:attribute name="barC_3" type="xs:string" use="prohibited"/>
  46. </xs:complexType>
  47. </xs:schema>