XML Schema for XForms 1.0 - fixes and suggestions

Three comments on the normative XML Schema for XForms 1.0:
  http://www.w3.org/MarkUp/Forms/2002/XForms-Schema.xsd

I've been trying to get an XHTML 1.0 transitional schema
hooked into XForms for schema validation (testing it with
XSV and XML Spy).


1. The definition of the "value" element says it is mixed
contents that can contain elements from any other namespace.
However, currently it is mandatory and must contain one and
only one of these other elements.  That is, the definition
is missing minOccurs and maxOccurs attributes for the
xsd:any.

Instead of:

 <xsd:element name="value">
    <xsd:complexType mixed="true">
      <xsd:sequence>
        <xsd:any namespace="##any" processContents="skip"/>
      </xsd:sequence>
      <xsd:attributeGroup ref="xforms:Common.Attributes"/>
      <xsd:attributeGroup ref="xforms:Single.Node.Binding.Attributes"/>
    </xsd:complexType>
 </xsd:element>

the fourth line should be:

      <xsd:any namespace="##any" processContents="skip"
       minOccurs="0" maxOccurs="unbounded"/>



2. The xsd:import for the XML Events schema brings in the
definition of the XML Events "listener" element (which isn't
being used) instead of the XML Events attributes (which are
being used).

That is, instead of:

  <xsd:import namespace="http://www.w3.org/2001/xml-events"
   schemaLocation="XML-Events-Schema.xsd"/>

it should really be:

  <xsd:import namespace="http://www.w3.org/2001/xml-events"
   schemaLocation="xml-events-attribs-1.xsd"/>



3. It is not trivial working out where the schema needs to
be modified - and is supposed to be modified - to integrate
the XForms schema with a host schema (such as XHTML).
Obviously, if different people modify the schema in
different ways, there will be compatibility problems.  This
is not a problem with the XForms schema per se, but is an
area that is lacking right now.

Some things that would help in this would be the declaration
of the elements "case", "group", and "repeat". Currently
these have comments that says "containg document language to
add additional allowed content here".  It would be good if
these were a complexType definition or a group definition
(rather than an element declaration), so that the XML Schema
redefinition mechanism can be used to add these components.
This avoids having to physically editing/changing the
normative XForms schema document to introduce those
elements. (However, keep the comments too.)

Some other parts of the schema could also be commented to
help the person trying to hook the XForms schema to a host
language's schema.  For example, I had to redefine the
"Common.Attributes" (to add an "id" attribute), and the
"UI.Common.Attrs" (to add a "class" attribute) to get it
working with XHTML, but wasn't sure if they were the right
places for it because there was no similar comment.

Thanks.

Hoylen
-- 
______________________________________________ Dr Hoylen Sue
h.sue@dstc.edu.au                    http://www.dstc.edu.au/
DSTC Pty Ltd --- Australian W3C Office       +61 7 3365 4310

Received on Monday, 1 September 2003 00:14:59 UTC