anyAttr1_0.xsd 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  1. <?xml version="1.0" encoding="ISO-8859-1"?>
  2. <xsd:schema xmlns:foo="http://FOO" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:import="http://IMPORT"
  3. targetNamespace="http://FOO" elementFormDefault="qualified">
  4. <xsd:import namespace="http://IMPORT" schemaLocation="anyAttr.importA.1_0.xsd"/>
  5. <xsd:import schemaLocation="anyAttr.importB.1_0.xsd"/>
  6. <xsd:element name="foo">
  7. <xsd:complexType>
  8. <xsd:sequence>
  9. <!-- Import -->
  10. <xsd:element ref="import:imp.element"/>
  11. <xsd:element name="imp.attribute">
  12. <xsd:complexType>
  13. <xsd:attribute ref="import:imp.attribute"/>
  14. </xsd:complexType>
  15. </xsd:element>
  16. <xsd:element name="imp.group">
  17. <xsd:complexType>
  18. <xsd:group ref="import:imp.group"/>
  19. </xsd:complexType>
  20. </xsd:element>
  21. <!-- Basic -->
  22. <xsd:element name="basic.A" type="foo:type.basic.A"/>
  23. <xsd:element name="basic.B" type="foo:type.basic.B"/>
  24. <xsd:element name="basic.C" type="foo:type.basic.C"/>
  25. <xsd:element name="basic.D" type="foo:type.basic.D"/>
  26. <xsd:element name="basic.E" type="foo:type.basic.E"/>
  27. <!-- Attribute Wildcard Intersection -->
  28. <xsd:element name="inters.1_1" type="foo:type.inters.1_1"/>
  29. <xsd:element name="inters.1_2" type="foo:type.inters.1_2"/>
  30. <xsd:element name="inters.1_3" type="foo:type.inters.1_3"/>
  31. <xsd:element name="inters.1_4" type="foo:type.inters.1_4"/>
  32. <xsd:element name="inters.2_1" type="foo:type.inters.2_1"/>
  33. <xsd:element name="inters.3_1" type="foo:type.inters.3_1"/>
  34. <xsd:element name="inters.4_1" type="foo:type.inters.4_1"/>
  35. <!--xsd:element name="inters.5_1" type="type.inters.5_1"/-->
  36. <xsd:element name="inters.6_1" type="foo:type.inters.6_1"/>
  37. </xsd:sequence>
  38. </xsd:complexType>
  39. </xsd:element>
  40. <!-- Basic -->
  41. <xsd:complexType name="type.basic.A">
  42. <xsd:anyAttribute namespace="##any" processContents="lax"/>
  43. </xsd:complexType>
  44. <xsd:complexType name="type.basic.B">
  45. <xsd:anyAttribute namespace="##other" processContents="lax"/>
  46. </xsd:complexType>
  47. <xsd:complexType name="type.basic.C">
  48. <xsd:anyAttribute namespace="##local" processContents="lax"/>
  49. </xsd:complexType>
  50. <xsd:complexType name="type.basic.D">
  51. <xsd:anyAttribute namespace="##targetNamespace" processContents="lax"/>
  52. </xsd:complexType>
  53. <xsd:complexType name="type.basic.E">
  54. <xsd:anyAttribute namespace="##targetNamespace ##local http://BAR" processContents="lax"/>
  55. </xsd:complexType>
  56. <!-- Attribute Wildcard Intersection -->
  57. <!-- 1. If O1 and O2 are the same value, then that value must be the value. -->
  58. <xsd:complexType name="type.inters.1_1">
  59. <xsd:attributeGroup ref="foo:attrGr.inters.1_1"/>
  60. <xsd:anyAttribute namespace="##any" processContents="lax"/>
  61. </xsd:complexType>
  62. <xsd:attributeGroup name="attrGr.inters.1_1">
  63. <xsd:anyAttribute namespace="##any"/>
  64. </xsd:attributeGroup>
  65. <xsd:complexType name="type.inters.1_2">
  66. <xsd:attributeGroup ref="foo:attrGr.inters.1_2"/>
  67. <xsd:anyAttribute namespace="##other" processContents="lax"/>
  68. </xsd:complexType>
  69. <xsd:attributeGroup name="attrGr.inters.1_2">
  70. <xsd:anyAttribute namespace="##other"/>
  71. </xsd:attributeGroup>
  72. <xsd:complexType name="type.inters.1_3">
  73. <xsd:attributeGroup ref="foo:attrGr.inters.1_3"/>
  74. <xsd:anyAttribute namespace="##local ##targetNamespace" processContents="lax"/>
  75. </xsd:complexType>
  76. <xsd:attributeGroup name="attrGr.inters.1_3">
  77. <xsd:anyAttribute namespace="##local ##targetNamespace"/>
  78. </xsd:attributeGroup>
  79. <xsd:complexType name="type.inters.1_4">
  80. <xsd:attributeGroup ref="foo:attrGr.inters.1_4"/>
  81. <xsd:anyAttribute namespace="##local http://BAR ##targetNamespace " processContents="lax"/>
  82. </xsd:complexType>
  83. <xsd:attributeGroup name="attrGr.inters.1_4">
  84. <xsd:anyAttribute namespace=" ##targetNamespace http://BAR ##local"/>
  85. </xsd:attributeGroup>
  86. <!-- 2. If either O1 or O2 is any, then the other must be the value. -->
  87. <xsd:complexType name="type.inters.2_1">
  88. <xsd:attributeGroup ref="foo:attrGr.inters.2_1"/>
  89. <xsd:anyAttribute namespace="##any" processContents="lax"/>
  90. </xsd:complexType>
  91. <xsd:attributeGroup name="attrGr.inters.2_1">
  92. <xsd:anyAttribute namespace="##local ##targetNamespace"/>
  93. </xsd:attributeGroup>
  94. <!-- 3. If either O1 or O2 is a pair of not and a value (a namespace name or ·absent·)
  95. and the other is a set of (namespace names or ·absent·), then that set, minus the
  96. negated value if it was in the set, minus ·absent· if it was in the set, must be the value. -->
  97. <xsd:complexType name="type.inters.3_1">
  98. <xsd:attributeGroup ref="foo:attrGr.inters.3_1"/>
  99. <xsd:anyAttribute namespace="##other" processContents="lax"/>
  100. </xsd:complexType>
  101. <xsd:attributeGroup name="attrGr.inters.3_1">
  102. <xsd:anyAttribute namespace="##local ##targetNamespace http://BAR"/>
  103. </xsd:attributeGroup>
  104. <!-- 4. If both O1 and O2 are sets of (namespace names or ·absent·), then the
  105. intersection of those sets must be the value. -->
  106. <xsd:complexType name="type.inters.4_1">
  107. <xsd:attributeGroup ref="foo:attrGr.inters.4_1"/>
  108. <xsd:anyAttribute namespace="##local ##targetNamespace http://BAR" processContents="lax"/>
  109. </xsd:complexType>
  110. <xsd:attributeGroup name="attrGr.inters.4_1">
  111. <xsd:anyAttribute namespace="##local ##targetNamespace"/>
  112. </xsd:attributeGroup>
  113. <!-- 5. If the two are negations of different namespace names,
  114. then the intersection is not expressible. -->
  115. <!--
  116. <xsd:complexType name="type.inters.5_1">
  117. <xsd:attributeGroup ref="import:attrGr.inters.5_1"/>
  118. <xsd:anyAttribute namespace="##other" processContents="lax"/>
  119. </xsd:complexType>
  120. -->
  121. <!--6. If the one is a negation of a namespace name and the other is a negation of ·absent·,
  122. then the one which is the negation of a namespace name must be the value.
  123. This one uses an attribute group from an imported schema with no targetNamespace.
  124. -->
  125. <xsd:complexType name="type.inters.6_1">
  126. <xsd:attributeGroup ref="attrGr.inters.6_1"/>
  127. <xsd:anyAttribute namespace="##other" processContents="lax"/>
  128. </xsd:complexType>
  129. <xsd:attributeGroup name="attrGrA">
  130. <xsd:anyAttribute namespace="##targetNamespace"/>
  131. </xsd:attributeGroup>
  132. </xsd:schema>