XML Schema attributeGroup ਅਣੂ

ਪਰਿਭਾਸ਼ਾ ਅਤੇ ਵਰਤੋਂ

attributeGroup ਅਣੂ ਅਟਰੀਬਿਊਟ ਨਿਰਦੇਸ਼ਾਂ ਨੂੰ ਸਮੂਹਬੱਧ ਕਰਨ ਲਈ ਵਰਤਿਆ ਜਾਂਦਾ ਹੈ, ਤਾਕਿ ਇਹ ਨਿਰਦੇਸ਼ਾਂ ਸਮੂਹ ਵਜੋਂ ਜਾਂਦੇ ਹੋਣ।

ਅਣੂ ਸੂਚਨਾ

ਦਿਸ਼ਾ-ਨਿਰਦੇਸ਼ ਬੰਦ ਨਹੀਂ ਹੋਣਾ
ਮੂਲ ਅਣੂ attributeGroup、complexType、schema、restriction (simpleContent)、extension (simpleContent)、restriction (complexContent)、extension (complexContent)
ਸਮੱਗਰੀ annotation、attribute、attributeGroup、anyAttribute

ਵਿਆਕਰਣ

<attributeGroup
id=ID
name=NCName
ref=QName
ਕੋਈ ਅਟਰੀਬਿਊਟ
>
(annotation?),((attribute|attributeGroup)*,anyAttribute?))
</attributeGroup>

(? ਚਿੰਨ੍ਹ ਅਟਰੀਬਿਊਟGroup ਅਣੂ ਵਿੱਚ ਘੋਸ਼ਿਤ ਹੁੰਦਾ ਹੈ, ਅਣੂ ਕੋਈ ਵੀ ਸਮਾਂ ਜਾਂ ਇੱਕ ਵਾਰ ਦਿਖਾਈ ਦੇ ਸਕਦਾ ਹੈ, * ਚਿੰਨ੍ਹ ਘੋਸ਼ਿਤ ਅਣੂ ਕੋਈ ਵੀ ਸਮਾਂ ਜਾਂ ਕਈ ਵਾਰ ਦਿਖਾਈ ਦੇ ਸਕਦਾ ਹੈ。)

ਅਟਰੀਬਿਊਟ ਵਰਣਨ
id ਵਿਕਲਪੀ। ਇਸ ਅਣੂ ਦੇ ਵਿਲੱਖਣ ਆਈਡੀ ਨਿਰਦੇਸ਼ਾਂ ਦਿੰਦੇ ਹਨ।
name ਵਿਕਲਪੀ। ਅਟਰੀਬਿਊਟ ਗਰੁੱਪ ਦਾ ਨਾਮ ਨਿਰਦੇਸ਼ਾਂ ਦਿੰਦੇ ਹਨ। name ਅਤੇ ref ਪ੍ਰਤੀਯੋਗਿਤਾ ਨਹੀਂ ਹੋ ਸਕਦੇ।
ref ਵਿਕਲਪੀ। ਕਿਸੇ ਵਿਸ਼ੇਸ਼ ਅਟਰੀਬਿਊਟ ਗਰੁੱਪ ਲਈ ਨਿਰਦੇਸ਼ਾਂ ਦਿੰਦੇ ਹਨ। name ਅਤੇ ref ਪ੍ਰਤੀਯੋਗਿਤਾ ਨਹੀਂ ਹੋ ਸਕਦੇ।
ਕੋਈ ਅਟਰੀਬਿਊਟ ਵਿਕਲਪੀ। ਕਿਸੇ ਨਾਨ ਸਕੇਮਾ ਨਾਮ ਸਪੇਸ ਦੇ ਕਿਸੇ ਹੋਰ ਅਟਰੀਬਿਊਟ ਦੀ ਨਿਰਦੇਸ਼ਾਂ ਦਿੰਦੇ ਹਨ।

ਮਾਪਦੰਡ

<xs:attributeGroup name="personattr">
  <xs:attribute name="attr1" type="string"/>
  <xs:attribute name="attr2" type="integer"/>
</xs:attributeGroup>
<xs:complexType name="person">
  <xs:attributeGroup ref="personattr"/>
</xs:complexType>

ਉੱਤੇ ਦਿੱਤੇ ਉਦਾਹਰਣ ਵਿੱਚ, "personattr" ਨਾਮ ਦੀ ਪੈਟਰੀਟੀ ਦਫ਼ਤਰ ਨੂੰ ਨਾਮ "person" ਦੇ ਕੰਪਲੈਕਸ ਟਾਈਪ ਵਿੱਚ ਵਰਤੀ ਜਾਂਦੀ ਹੈ。