W3C home > Mailing lists > Public > xmlschema-dev@w3.org > October 2001

RE: <group> legal under <extension>?

From: Sean Hester <SHester@extremelogic.com>
Date: Fri, 12 Oct 2001 11:32:26 -0400
Message-ID: <DB34C56F4566A14CB916AEF558ABA98319F914@falcon.extremelogic.net>
To: "Hamish Eisler" <HEisler@2roam.com>, "Xmlschema-Dev (E-mail)" <xmlschema-dev@w3.org>

I dug through this issue earlier this week. I needed to define a
complexType to have [1] a fixed enumeration of valid children, [2] their
was no specific sequence or cardinality for the children, [3] only one
of the valid children of any of the appropriate types is required. Spy
was happy with the following code (though I haven't put it into
integration testing yet):

	<xs:complexType name="form">
			<xs:extension base="container">
				<xs:group ref="formContent"
minOccurs="1" maxOccurs="unbounded"/>
				<xs:attribute name="formName"
				<xs:attribute name="uiParentContainerID"
				<xs:attribute name="workflow"
	<xs:group name="formContent">
		<xs:choice maxOccurs="unbounded">
			<xs:element name="fieldGroup" type="container"/>
			<xs:element name="group" type="container"/>
			<xs:element name="hidden" type="container"/>
			<xs:element name="iFrame" type="container"/>
			<xs:element name="outlookBar" type="container"/>
			<xs:element name="processingRules"
			<xs:element name="renderWrapper"
			<xs:element name="tabSet" type="container"/>
			<xs:element name="table" type="container"/>

-----Original Message-----
From: Hamish Eisler [mailto:HEisler@2roam.com] 
Sent: Thursday, October 11, 2001 8:34 PM
To: Xmlschema-Dev (E-mail)
Subject: <group> legal under <extension>?

Hi everyone -

Can someone in the know tell me if the following is legal?

	<xsd:complexType name="foo.extended.type">
			<xsd:extension base="xhtml:form.type">
				<xsd:group ref="foo.extension.content"/>

Basically, can I use <group> to extend an element, instead of directly
placing a <sequence>, <choice>, or <all> node underneath?

Seems logical, but maybe I'm missing something (or XML Spy is)...


Received on Friday, 12 October 2001 11:29:29 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:14:54 UTC