W3C home > Mailing lists > Public > www-forms@w3.org > July 2005

Using and extending XForms-Schema.xsd

From: Adrian Baker <adrian.r.baker@gmail.com>
Date: Wed, 20 Jul 2005 11:26:57 +1200
Message-ID: <2fcab40705071916261b3254a@mail.gmail.com>
To: www-forms@w3.org

We have a forms application in which our forms are defined using
XForms hosted in proprietary xml document (these are then converted
via XSLT to XHTML+XForms documents which are passed to the XForms

I've been trying to integrate our inhouse proprietary form schema
(which isn't particularly complex - primarily it's just a platform
independent container document for the XForms markup) with the
XForms-Schema.xsd defined as part of the spec

One extension we have is that some extra tags are present inside
xforms elements, for example a group can have a 'layout' metadata tag
(from our own namespace), which affects the XHTML generated from the
form definition (because we wanted more precise control than the
minimal, compact & full appearance hints)

<xforms:group bind="bind-name">
   <xforms:input bind="bind-firstname">
       <xforms:label>First Name</xforms:label>
   <xforms:input bind="bind-lastname">
       <xforms:label>Last Name</xforms:label>

My schema knowledge is fairly basic, but my first instinct here was to
look for a way to extend the XForms group type to allow a 'layout' tag
to be added. As far as I could tell though, there is no such type
declared (in fact there are no complexTypes declared at all), only a
top level group element which isn't available for extension:

   <xsd:element name="group">
               <xsd:element ref="xforms:label" minOccurs="0"/>
               <xsd:sequence minOccurs="0" maxOccurs="unbounded">
                       <xsd:group ref="xforms:UI.Common"/>
                       <xsd:group ref="xforms:Form.Controls"/>
                       <xsd:element ref="xforms:group"/>
                       <xsd:element ref="xforms:switch"/>
                       <xsd:element ref="xforms:repeat"/>
                       <!-- containing document language to add
additional allowed content here -->
           <xsd:attributeGroup ref="xforms:Common.Attributes"/>
           <xsd:attributeGroup ref="xforms:Single.Node.Binding.Attributes"/>
           <xsd:attributeGroup ref="xforms:UI.Common.Attrs"/>

Note the comment 'containing document language to add additional
allowed content here' - precisely what I want to do, but am I expected
to actually maintain and edit a local copy of this schema to do this?
Certainly that's easy enough, especially since I expect the public
version will be slow to change, but surely the preferred method would
be to extend, rather than directly modify?

Received on Tuesday, 19 July 2005 23:30:16 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:36:15 UTC