RE: Strange construction in XForms schema

Hi Jérome,

not being a schema guru myself, I have a different reading of the Schema
spec:

According to XML Schema 1 (Structures), 3.8.2 (what you quoted), it is
legal to have a group inside a sequence (my appologies for the notation,
it's meant to be read by humans :-):

<sequence 
	[...]
  Content: (annotation?, (element | group | choice | sequence | any)*)
                                    ^^^^^
</sequence>


And according to 3.7.2 it is legal to have "all" inside group:

<group 
	[...]
  Content: (annotation?, (all | choice | sequence))
                          ^^^
</group>


You are right, effectively we are building something that wasn't
possible if "written out" - but as so often in computer sciences, one
level of indirection solves every problem.

Josef


> -----Original Message-----
> From: Jérôme Nègre [mailto:jerome.negre@ecl2000.ec-lyon.fr]
> Sent: Monday, October 08, 2001 10:39 AM
> To: www-forms@w3.org
> Subject: Strange construction in XForms schema
> 
> 
> Hi all,
> 
> I'm a bit confused by the XForms schema.
> 
> The selectOne element is defined as follow:
> 
>   <xsd:element name="selectOne">
>     <xsd:complexType>
>       <xsd:sequence>
>         <xsd:group ref="xform:commonUIChildren"/>
>         <xsd:element ref="xform:choices"/>
>       </xsd:sequence>
>       <xsd:attribute name="id" type="xsd:ID" use="optional"/>
>       <xsd:attributeGroup ref="xform:bindFirstAttributes"/>
>       <xsd:attributeGroup ref="xform:commonUIAttributes"/>
>       <xsd:attribute name="selectUI" type="xform:selectUIType"
> use="optional"/>
>     </xsd:complexType>
>   </xsd:element>
> 
> The definition of commonUIChildren is:
> 
>   <xsd:group name="commonUIChildren">
>     <xsd:all>
>       <xsd:element ref="xform:caption"/>
>       <xsd:element ref="xform:help" minOccurs="0"/>
>       <xsd:element ref="xform:hint" minOccurs="0"/>
>       <xsd:element ref="xform:alert" minOccurs="0"/>
>       <xsd:element ref="xform:action" minOccurs="0"/>
>       <xsd:element ref="xform:extension" minOccurs="0"/>
>     </xsd:all>
>   </xsd:group>
> 
> 
> So the final model is:
> 
> <sequence>
>     <all>
>         ...
>     </all>
>      ...
> </sequence>
> 
> According to Schema Structure 3.8.2, this seems to be an 
> invalid construct.
> 
> Since I'm far from being a Schema guru, I'd really appreciate 
> opinions from
> the list.
> 
> Thanks,
> 
> Jérôme Nègre
> 
> 
> 

Received on Monday, 8 October 2001 08:41:38 UTC