derivation-ok-restriction-4-1-err_0.xsd 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. <?xml version="1.0" encoding="ISO-8859-1" ?>
  2. <!--
  3. Schema Component Constraint: Derivation Valid (Restriction, Complex)
  4. 4 If there is an {attribute wildcard}, all of the following must be true:
  5. 4.1 The {base type definition} must also have one.
  6. 4.2 The complex type definition's {attribute wildcard}'s {namespace constraint}
  7. must be a subset of the {base type definition}'s {attribute wildcard}'s {namespace
  8. constraint}, as defined by Wildcard Subset (§3.10.6).
  9. 4.3 Unless the {base type definition} is the ·ur-type definition·, the complex type
  10. definition's {attribute wildcard}'s {process contents} must be identical to or stronger
  11. than the {base type definition}'s {attribute wildcard}'s {process contents},
  12. where strict is stronger than lax is stronger than skip.
  13. -->
  14. <schema xmlns="http://www.w3.org/2001/XMLSchema"
  15. targetNamespace="http://FOO"
  16. xmlns:foo="http://FOO"
  17. >
  18. <element name="foo">
  19. <complexType>
  20. <sequence>
  21. <element name="bar.A" type="foo:type.A" />
  22. <element name="bar.B" type="foo:type.B" />
  23. <element name="bar.C" type="foo:type.C" />
  24. </sequence>
  25. </complexType>
  26. </element>
  27. <complexType name="type.A">
  28. <complexContent>
  29. <restriction base="foo:base.type.A">
  30. <anyAttribute namespace="##any" processContents="skip" />
  31. </restriction>
  32. </complexContent>
  33. </complexType>
  34. <complexType name="base.type.A">
  35. <attribute name="bar" type="string"/>
  36. </complexType>
  37. <complexType name="type.B">
  38. <complexContent>
  39. <restriction base="foo:base.type.B">
  40. <anyAttribute namespace="##any" processContents="skip" />
  41. </restriction>
  42. </complexContent>
  43. </complexType>
  44. <complexType name="base.type.B">
  45. <anyAttribute namespace="http://FOO" processContents="skip" />
  46. </complexType>
  47. <complexType name="type.C">
  48. <complexContent>
  49. <restriction base="foo:base.type.C">
  50. <anyAttribute namespace="##any" processContents="skip" />
  51. </restriction>
  52. </complexContent>
  53. </complexType>
  54. <complexType name="base.type.C">
  55. <anyAttribute namespace="##any" processContents="lax" />
  56. </complexType>
  57. </schema>