- From: Adrian Baker <adrian.r.baker@gmail.com>
- Date: Wed, 20 Jul 2005 11:26:57 +1200
- 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 engine). 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 (http://www.w3.org/MarkUp/Forms/2002/XForms-Schema.xsd). 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"> <layout:vertical-layout/> <xforms:input bind="bind-firstname"> <xforms:label>First Name</xforms:label> </xforms:input> <xforms:input bind="bind-lastname"> <xforms:label>Last Name</xforms:label> </xforms:input> </xforms:group> 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:complexType> <xsd:sequence> <xsd:element ref="xforms:label" minOccurs="0"/> <xsd:sequence minOccurs="0" maxOccurs="unbounded"> <xsd:choice> <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:choice> </xsd:sequence> </xsd:sequence> <xsd:attributeGroup ref="xforms:Common.Attributes"/> <xsd:attributeGroup ref="xforms:Single.Node.Binding.Attributes"/> <xsd:attributeGroup ref="xforms:UI.Common.Attrs"/> </xsd:complexType> </xsd:element> 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? Adrian
Received on Tuesday, 19 July 2005 23:30:16 UTC