XML Schema redefine element

ການກໍານົດ ແລະ ການນໍາໃຊ້

redefine element ອະນຸຍາດການປັບປຸງ type, group, attribute group ຈາກ schema ຕ່າງໆ ໃນ Schema ປະຈຸບັນ.

ຂໍ້ມູນ element

ຈຳການການສະແດງ ບໍ່ມີຂໍ້ຈຳກັດ
ປະຈຳເຂດພິມ schema
ຂອບເຂດ annotation、attributeGroup、complexType、group、simpleType

ວິນຍານ

<redefine
id=ID
schemaLocation=anyURI
any attributes
>
(annotation|(simpleType|complexType|group|attributeGroup))*
</redefine>
ປະກອບປະກອບ ອະທິບາຍ
id ຄວາມຄິດ. ກໍານົດ ID ສະນັບສະນັກຂອງ element.
schemaLocation ຈຳເປັນ. URI reference ສໍາລັບການທີ່ຕັ້ງ schema.
any attributes ຄວາມຄິດ. ກໍານົດປະກອບປະກອບອື່ນໆທີ່ມີ namespace non-schema.

ຄວາມຄິດ

ຕົວຢ່າງ 1

ຄວາມຄິດຂອງຄວາມວິນຍານດັ່ງກ່າວນີ້ສະແດງເປັນ schema ຊື່ວ່າ Myschama2.xsd ທີ່ມີ element ທີ່ຕັ້ງຕາມ Myschama1.xsd. Type pname ໄດ້ຖືກການປັບປຸງ. ຕາມ schema ນີ້ element ທີ່ຖືກ pname ກັບຄວາມຄິດ "country" element.

Myschema1.xsd:

<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:complexType name="pname">
  <xs:sequence>
    <xs:element name="firstname"/>
    <xs:element name="lastname"/>
  

<xs:element name="customer" type="pname"/>

Myschema2.xsd:

<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:redefine schemaLocation="Myschema1.xsd">
  <xs:complexType name="pname">
    <xs:complexContent>
      <xs:extension base="pname">
        <xs:sequence>