XML Schema redefine ਇਲੈਕਟ੍ਰੌਨਿਕ ਅੰਗ

ਨਿਰਧਾਰਣ ਅਤੇ ਵਰਤੋਂ

redefine ਇਲੈਕਟ੍ਰੌਨਿਕ ਅੰਗ ਨੂੰ ਵਰਤਣ ਵਾਲੇ ਸਾਧਾਰਨ ਅਤੇ ਸੰਕਲਪਿਤ ਤਰੀਕੇ, ਗਰੁੱਪ ਅਤੇ ਵਿਸ਼ੇਸ਼ਤਾ ਗਰੁੱਪ ਨੂੰ ਮੁੜ ਨਿਰਦੇਸ਼ਿਤ ਕਰਨ ਲਈ ਅਪਣਾਇਆ ਜਾਂਦਾ ਹੈ。

ਇਲੈਕਟ੍ਰੌਨਿਕ ਅੰਗ ਸੂਚਨਾ

ਆਉਣ ਵਾਲੀ ਗੱਲ ਬੰਧਤਾ ਨਹੀਂ
ਮੂਲ ਇਲੈਕਟ੍ਰੌਨਿਕ ਅੰਗ schema
ਸਮੱਗਰੀ annotation、attributeGroup、complexType、group、simpleType

ਗਰੰਥ

<redefine
id=ID
schemaLocation=anyURI
ਕਿਸੇ ਹੋਰ ਵਿਸ਼ੇਸ਼ਤਾ
>
(annotation|(simpleType|complexType|group|attributeGroup))*
</redefine>
ਵਿਸ਼ੇਸ਼ਤਾ ਵਰਣਨ
id ਵਿਕਲਪੀ।ਇਸ ਇਲੈਕਟ੍ਰੌਨਿਕ ਅੰਗ ਦੇ ਵਿਲੱਖਣ ਆਈਡੀ ਨਿਰਦੇਸ਼ਨ ਕਰਨ ਲਈ ਵਿਕਲਪੀ।
schemaLocation ਲਾਜ਼ਮੀ।schema ਦਸਤਾਵੇਜ਼ ਦੀ ਸਥਾਨਕਤਾ ਲਈ URI ਉਲੇਖ ਲਾਜ਼ਮੀ ਹੈ।
ਕਿਸੇ ਹੋਰ ਵਿਸ਼ੇਸ਼ਤਾ ਵਿਕਲਪੀ।non-schema ਨਾਮ ਸਪੇਸ ਵਾਲੇ ਕਿਸੇ ਹੋਰ ਵਿਸ਼ੇਸ਼ਤਾ ਦੀ ਨਿਰਦੇਸ਼ਨਕਰਨ ਕਰਨ ਲਈ ਵਿਕਲਪੀ।

ਮਾਡਲ

ਉਦਾਹਰਣ 1

ਇਸ ਉਦਾਹਰਣ ਵਿੱਚ ਇੱਕ schema ਦਿਸ਼ਾਨਿਰਦੇਸ਼ਨ, Myschama2.xsd, ਜਿਸ ਵਿੱਚ Myschama1.xsd ਦੁਆਰਾ ਨਿਰਦੇਸ਼ਿਤ ਇਲੈਕਟ੍ਰੌਨਿਕ ਅੰਗ ਹਨ।pname ਤਰੀਕੇ ਨੂੰ ਮੁੜ ਨਿਰਦੇਸ਼ਿਤ ਕੀਤਾ ਗਿਆ ਹੈ।ਇਸ schema ਦੇ ਅਨੁਸਾਰ, pname ਦੁਆਰਾ ਸੀਮਤ ਇਲੈਕਟ੍ਰੌਨਿਕ ਅੰਗ ਨੂੰ "country" ਇਲੈਕਟ੍ਰੌਨਿਕ ਅੰਗ ਨਾਲ ਸਮਾਪਤ ਕਰਨਾ ਹੈ:

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:sequence>
</xs:complexType>
<xs:element name="customer" type="pname"/>
</xs:schema>

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>
          <xs:element name="country"/>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
</xs:redefine>
<xs:element name="author" type="pname"/>
</xs:schema>