- From: Matthew Merlo <matthew.j.merlo@lmco.com>
- Date: Wed, 16 Feb 2000 09:25:49 -0700
- To: www-xml-schema-comments@w3.org
Okay here's an easy question for you all: I'm in the middle of writing my first large schema and I'm actually translating it from a DAG def...fun stuff, I know. I'm in the process of defining some primitive element types and I came across some types in the def that are nothing but sequences of other types. My question is, how can I accurately (and efficiently) represent both types? I want to keep them separate from each other so that the ending xml schema representation closely mirrors its DAG counterpart...which may eliminate any chance of efficient representation but I'll sacrifice that for clarity...for now. I suppose below would be the quick and dirty way to represent what I need but there's got to be a cleaner method. <type name="item-seq"> <element name = "title" type="string"/> <element name="id" type="float"/> </type> <type name="item" source="ns:item-seq" derivedBy="restriction"> <element name = "title" type = "string" maxOccurs = "1"/> <element name="id" type="float" maxOccurs = "1"/> </type> Can the above be simplified perhaps with a nameless sub type like so: ?? <type name="item" source="ns:item-seq" derivedBy="restriction"> <type maxOccurs = "1"> <element name = "title" type = "string"> <element name="id" type="float"> </type> <type/> Thanks in advance for any advice.
Received on Wednesday, 16 February 2000 11:36:01 UTC