[
Lists Home |
Date Index |
Thread Index
]
Structure
<Table>
<attribute1>name</attribute1>
<attribute2>5</attribute2>
<out_of_hierarchy_table1>
<attribute1>red</attribute1>
</out_of_hierarchy_table1>
<out_of_hierarchy_table2>
<attribute1>green</attribute1>
</out_of_hierarchy_table2>
<child_table1>
<attribute1>cow</attribute1>
</child_table1>
<child_table2>
<attribute1>horse</attribute1>
</child_table2>
</Table>
Desire:
What to have an order that dictates:
Table's attributes occurs first
Out_of_hiearchy_tables occur second
Child_tables occur last.
But with each group allow an un-order list.
i.e. allow attribute2 before attribute1
allow out_of_hiearchy_table2 before out_of_hierarchy_table1
allow child_table2 before child_table1
With Schema:
<xs:schema targetNamespace="http://www.lgc.com/schema/OpenWorksData/2003"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:targetns="http://www.lgc.com/schema/OpenWorksData/2003"
elementFormDefault="qualified" attributeFormDefault="unqualified">
<xs:element name="Table" type="targetns:TableType"/>
<xs:complexType name="TableType">
<xs:sequence>
<xs:group ref="targetns:Table_Atrributes_Group"/>
<xs:group ref="targetns:Table_OOHParents_Group"/>
<xs:group ref="targetns:Table_Children_Group"/>
</xs:sequence>
</xs:complexType>
<xs:group name="Table_Atrributes_Group">
<xs:all>
<xs:element name="attribute1" type="xs:string"/>
<xs:element name="attribute2" type="xs:integer"/>
</xs:all>
</xs:group>
<xs:group name="Table_OOHParents_Group">
<xs:all>
<xs:element name="out_of_hierarchy_table1">
<xs:complexType>
<xs:sequence>
<xs:element name="attribute1" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="out_of_hierarchy_table2">
<xs:complexType>
<xs:sequence>
<xs:element name="attribute1" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:all>
</xs:group>
<xs:group name="Table_Children_Group">
<xs:all>
<xs:element name="child_table1">
<xs:complexType>
<xs:sequence>
<xs:element name="attribute1" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="child_table2">
<xs:complexType>
<xs:sequence>
<xs:element name="attribute1" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:all>
</xs:group>
</xs:schema>
I get the following error output:
Table.xml:3:Error: cos-all-limited.1.2: A group whose content is "all" must
only appear as the content type of a complex type definition. Saw group in
"sequence".
Table.xml:3:Error: cos-all-limited.1.2: A group whose content is "all" must
only appear as the content type of a complex type definition. Saw group in
"sequence".
Table.xml:3:Error: cos-all-limited.1.2: A group whose content is "all" must
only appear as the content type of a complex type definition. Saw group in
"sequence".
Table.xml:24:The content of element type "Table" must match "EMPTY".
Is there another way to achieve my desired goals ?
Note: XMLSpy is happy with the above XMLSchema.
Bill Riegel
LandMark Graphics
713-839-3388
|