W3C home > Mailing lists > Public > public-forms@w3.org > June 2007

Re: test case for bind/@type validation and first text node rule

From: Erik Bruchez <ebruchez@orbeon.com>
Date: Wed, 20 Jun 2007 23:22:40 +0200
Message-ID: <46799AA0.4050408@orbeon.com>
To: public-forms@w3.org

Ulrich & all,

 > in the telecon today we agreed that it is a good thing to drop the
 > first text node rule for getting/setting instance data values. You
 > proposed we use the definition of content found in
 > http://www.w3.org/TR/2004/REC-xml-20040204/#sec-starttags Rule 43.
 > However, the rule is
 >
 > content	::= CharData? ((element | Reference | CDSect | PI | Comment)
 > CharData?)*
 >
 > which means to me: There is no emtpy content. So we would still
 > suffer from the idiosyncrasy that binding to an empty element would
 > make a control non-relevant because there is no content.

The way I see it, MIPs will still be set on the *element*, not on its
content.

This means that a control bound to an element with empty content won't
be non-relevant unless the element itself disappears, or the element
has a MIP like this:

   <xforms:bind nodeset="my-element" relevant="false()"/>

We should not confuse two very different things:

1. Binding to an element remains binding to an element. The element is
    what the MIPs are associated to, in the same way that MIPs are
    associated with other node types.

2. However, validation applies to the *content* of the element, and
    controls read and write from and to the *content* of the element.

This way, everything is clean and simple.

 > I like the idea of using XML's content definition, but it won't
 > solve all problems we have with the first text node rule. So maybe
 > we should stick to the XPath Data Model: In
 > http://www.w3.org/TR/xpath#data-model there is string-value
 > language. For empty Elements string-value would turn out to be the
 > empty string. This would keep the controls from becoming
 > non-relevant in the first place.

I don't think the above is necessary.

-Erik

-- 
Orbeon Forms - Web Forms for the Enterprise Done the Right Way
http://www.orbeon.com/
Received on Wednesday, 20 June 2007 21:22:45 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 1 October 2013 22:06:43 UTC