W3C home > Mailing lists > Public > www-forms-editor@w3.org > May 2006

RE: Problem with XForms 1.0 Basic Profile document when used with XFo rms Full processor

From: Klotz, Leigh <Leigh.Klotz@xerox.com>
Date: Tue, 2 May 2006 15:43:34 -0700
Message-ID: <E254B0A7E0268949ABFE5EA97B7D0CF401CD78FA@usa7061ms01.na.xerox.net>
To: "Steven Pemberton" <steven.pemberton@cwi.nl>, <www-forms-editor@w3.org>
Cc: "Klotz, Leigh" <Leigh.Klotz@xerox.com>

Steven,
Thank you for your response to this issue.

My concern is that there are two independent sources of type
information, and that the effects of these two sources under XForms 1.0
and XForms Basic 1.0 might be different, depending on how conflicts are
handled in XForms 1.0 full conformance.  I gave a use case where an
XForms 1.0 Basic author might consider authoring a form that would work
properly in XForms Basic but not in XForms full conformance.  

It may be that the existing recommendation wording about xsi:type
equivalence is sufficient, and I would like to hear from the Working
Group about why it is not.

Unfortunately, the proposed resolution does not address my concern about
how to resolve the two sources of information; instead, it restates it
to say that there are two sources of information, and offers no
prescription for interoperability.  Additionally, I am concerned that
the solution proposed (having two separate pools of type information)
makes XForms more difficult for authors, and am hopeful that there is a
better solution.

Therefore, I must with reluctance say that this response does not
satisfy my comment.

As you are aware, I rejoined the XForms Working Group on behalf of Xerox
recently, though I was not a representative at the time the comment was
filed.  I look forward to working through this issue with the rest of
the Working Group and hope for resolution to my comment at the next
Face-to-Face meeting.

Sincerely,
Leigh L. Klotz, Jr.
Xerox Corporation

 

-----Original Message-----
From: Steven Pemberton [mailto:steven.pemberton@cwi.nl] 
Sent: Tuesday, May 02, 2006 7:26 AM
To: Klotz, Leigh; 'www-forms-editor@w3.org'
Subject: Re: Problem with XForms 1.0 Basic Profile document when used
with XFo rms Full processor

Leigh,

Thank you for your comment.

The XForms WG discussed this issue[1] and resolved that the problem lay

with the description of how types are bound to the data in XForms. They

resolved to:

"Issue an erratum for 6.1.1 Type property about how the type is bound to

the data. It mustn't be done by equivalency to xsi:type attribute."

If this reply satisfies your comment, please reply to this mail to that

effect.

Many thanks,

Steven Pemberton
For the XForms WG

[1] http://www.w3.org/2006/03/23-xforms-minutes#item02

On Tue, 31 Aug 2004 23:23:56 +0200, Klotz, Leigh  
<Leigh.Klotz@pahv.xerox.com> wrote:

>
>
> In "3 Conformance", the XForms 1.0 Basic Profile CR [1] says
>   XForms Basic Profile processors may implement a subset of an XML
Schema
> processor
>   [XML Schema part 1], [XML Schema part 2], requiring only what is  
> necessary
> to process
>   the attribute xsi:type on instance data for simpleTypes only and the

> type
> model
>   item property for simpleTypes only.
>
> In "3.3.1 The model Element", the XForms 1.0 REC [2] says
>   Optional list of xsd:anyURI links to XML Schema documents outside
this
> model element.
>   The XForms Processor must process all Schemas listed in this
attribute.
>
> My understanding is that the Basic Profile changes this "must" to
either  
> a
> "must not" or perhaps a "should not" for XForms Basic.
> In any case, I assume that the schema attribute (and similarly, the  
> embedded
> xsd:schema element) are allowed in documents processed by an XForms
Basic
> processor, but are to be ignored.
>
> Now, consider the following case where an instance contains an element

> with
> a simple value (such as a decimal or a time) and a boolean attribute:
>
>   <time precise="true">06:00:00</time>
>
> The goal of adding an attribute to an element of simple type content
is
> common, and in fact the first qustion in a popular XML Schema FAQ [3]

> shows
> that it is in fact, a frequently-asked question.  The cited FAQ then  
> gives a
> complexType definition extending a simple type and adding an
attribute.
>
> Here is a complete XForms Full example, using XML Schema, a sample  
> instance
> document, and an XHTML 1 document with XForms controls, using the XML
> Schema.  It relies on the XML Schema referred to from the model to
define
> the type of the attribute as boolean, so that the XForms Processor may
> display it as a checkbox.
>
> XForms Basic does not interpret the schema attribute, but it does  
> "process
> ... type model item property for simpleTypes only" so we can add
>   <xf:bind ref="my:length/@my:precise" type="xsd:boolean" />
> to the model, and both Full and Basic XForms Processors will display
the
> attribute as a boolean (for example, as a checkbox in a graphical user
> interface).
>
> Note that the base type of the element, xsd:time, is also one that
XForms
> processors may choose to use for display purposes, perhaps by showing
a  
> time
> chooser (see "8.1.2 The Input Element" [4]).  So, the natural next
step
> would be to bind that type to the node, as follows:
>   <xf:bind ref="my:length" type="xsd:time" />
> This will indeed work in XForms Basic, because it will process the
type
> model item property, and xsd:time is an XML Schema simpleType and is
in  
> the
> list of types to be processed by XForms Basic.
>
> Unfortunately, XForms Full processors have already interpreted the XML
> Schema specified by the model schema attribute, and have a conflicting

> type.
>
> Therefore, I believe that it is difficult to create XForms Full
profile
> documents that also work in XForms Basic, unless some subtyping  
> allowances
> are introduced into the consistency checking performed by the type
model
> item property.
>
> Leigh.
>
> -------------------precision.xml---------------------
>   <?xml version="1.0" ?>
>   <data xmlns="http://www.example.com">
>     <time precise="true">06:00:00</time>
>   </data>
> ---------------------precision.xsd-----------------------
>   <?xml version="1.0" ?>
>   <xsd:schema xmlns:my="http://www.example.com"
> 	      targetNamespace="http://www.example.com"
> 	      xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> 	      elementFormDefault="qualified">
>     <xsd:element name="data">
>       <xsd:complexType>
> 	<xsd:sequence>
> 	  <xsd:element ref="my:time" />
> 	</xsd:sequence>
>       </xsd:complexType>
>     </xsd:element>
>     <xsd:element name="time" type="my:preciseTime"/>
>     <xsd:complexType name="preciseTime">
>       <xsd:simpleContent>
> 	<xsd:extension base="xsd:time">
> 	  <xsd:attribute name="precise" type="xsd:boolean"
use="required"/>
> 	</xsd:extension>
>       </xsd:simpleContent>
>     </xsd:complexType>
>   </xsd:schema>
>
> ---------------------precision.xhtml---------------------
>   <?xml version="1.0" encoding="iso-8859-1" ?>
>   <html xmlns="http://www.w3.org/1999/xhtml"
> 	xmlns:xf="http://www.w3.org/2002/xforms"
> 	xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> 	xmlns:my="http://www.example.com">
>     <head>
>       <title>XForms Samples</title>
>       <xf:model schema="precision.xsd">
> 	<xf:instance src="precision.xml" />
> 	<xf:bind nodeset="my:time" type="xsd:time" />
> 	<xf:bind nodeset="my:time/@my:precise" type="xsd:boolean" />
>       </xf:model>
>     </head>
>     <body>
>       <h1>Precision</h1>
>       <xf:group>
> 	<xf:input ref="my:time"><xf:label>Time</xf:label></xf:input>
> 	<xf:input
> ref="my:time/@my:precise"><xf:label>Precise?</xf:label></xf:input>
>       </xf:group>
>     </body>
>   </html>
> -------------------------------------------------------------
>
> [1] http://www.w3.org/TR/2003/CR-xforms-basic-20031014/#id2606183
> [2]
>
http://www.w3.org/TR/2003/REC-xforms-20031014/index-all.html#structure-m
odel
> [3] http://www.mathling.com/xsd/
> [4]
http://www.w3.org/TR/2003/REC-xforms-20031014/index-all.html#ui-input
>
>
Received on Tuesday, 2 May 2006 22:45:54 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 10 June 2009 18:12:15 GMT