restriction-attr1_0.xsd 725 B

123456789101112131415161718
  1. <?xml version="1.0" encoding="ISO-8859-1"?>
  2. <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://FOO" targetNamespace="http://FOO">
  3. <xs:element name="foo">
  4. <xs:complexType>
  5. <xs:complexContent>
  6. <xs:restriction base="typeA">
  7. <xs:attribute name="barA" type="xs:string" use="optional"/>
  8. </xs:restriction>
  9. </xs:complexContent>
  10. </xs:complexType>
  11. </xs:element>
  12. <xs:complexType name="typeA">
  13. <xs:attribute name="barA" type="xs:string" use="required"/>
  14. </xs:complexType>
  15. </xs:schema>