- From: Emer Magnani <Emer.Magnani@di3.co.uk>
- Date: Wed, 8 May 2002 05:41:41 -0400 (EDT)
- To: "'xmlschema-dev@w3.org'" <xmlschema-dev@w3.org>
Hi, I have an xml schema that defines elements using the "sequence" content model. I am trying to modify the schema so that it allows child elements to appear in any order. Here is sample element: the element <myNode> can contain 0 or 1 elements <propertyA> and 0 or 1 elements <propertyB>. <myNode> can also contain 0 or more elements <myNode>. <myNode> <propertyA>100</propertyA> [0..1] <propertyB>a value</propertyB> [0..1] <myNode> [0..unbounded] <....> </myNode> <myNode> <....> </myNode> </myNode> Currently, I have a schema that uses the "sequence" content model. This defines an abstract element "applicationNode" of type "ApplicationNode", which can recursively contain other "applicationNode" elements: <xs:element name="applicationNode" type="sdl:ApplicationNode" abstract="true"/> <xs:complexType name="ApplicationNode" abstract="true"> <xs:sequence> <xs:element ref="sdl:applicationNode" minOccurs="0" maxOccurs="unbounded"/> </xs:sequence> </xs:complexType> Other types extend the abstract "ApplicationNode", adding the relevant property elements to form concrete types (i.e. type MyNode has propertyA, propertyB. Type AnotherNode has propertyC, etc.). Looking at the definition of the "all" content model, it appears to me that the "all" content model cannot be used to express such a hierarchical structure. Is there any work around? Any help would be appreciated. Emer.
Received on Saturday, 11 May 2002 10:38:26 UTC