[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

having problems using the all compositor


xs all
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



PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.