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>

(? చిహ్నం attributeGroup కొన్నికి వాడుతారు, పదకొనికి వాడుతారు, * చిహ్నం కొన్నికి వాడుతారు, పదకొనికి వాడుతారు.)

అంశం వివరణ
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" 的复杂类型中使用。