XSD schemas allow for group attributes and refering to them within type declarations. This illustrated in the following example where PurchaseOrderType referes to the attribute group purchaseData:
Figure: Attribute group in XML Schemas and their import into UML
<xsd:complexType name="PurchaseOrderType"> <xsd:sequence> <xsd:choice> <xsd:group ref="typens:shipAndBill"/> </xsd:choice> </xsd:sequence> <xsd:attributeGroup ref="typens:purchaseData"/> </xsd:complexType> <xsd:attributeGroup name="purchaseData"> <xsd:attribute name="orderDate" type="xsd:date"/> <xsd:attribute name="purchaseDate" type="xsd:date"/> </xsd:attributeGroup>
|
---|
Such xsd:attributeGroup
references are resolved by the Importer, therefore they are not visible in the imported classes. Above table depicts the situation where the PurchaseOrderType class contains the orderDate and purchaseDate attributes corresponding to the elements of the imported purchaseData group which is not visible anymore.
Overview
Content Tools