W3C home > Mailing lists > Public > www-forms-editor@w3.org > September 2003

XML Schema for XForms 1.0 - fixes and suggestions

From: Hoylen Sue <hoylen@dstc.edu.au>
Date: 01 Sep 2003 14:14:57 +1000
To: www-forms-editor@w3.org
Message-ID: <coisod5em6.fsf@predator.dstc.edu.au>

Three comments on the normative XML Schema for XForms 1.0:

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

Instead of:

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

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"

it should really be:

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

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.


______________________________________________ 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

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:25:05 UTC