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

More on datatype validation: what's a possible algorithm?

From: Erik Bruchez <ebruchez@orbeon.com>
Date: Thu, 31 May 2007 15:26:29 -0700
Message-ID: <465F4B95.5010006@orbeon.com>
To: public-forms@w3.org


Let's continue with some schema questions. As discussed in this


there is a pending action item to amend the spec so that "revalidate
only perform validation of datatypes, not structural validation,
*except* during submission".

Now I am just wondering how an implementation can do this. If you
assign datatypes with xforms:bind or xsi:type, then it is quite

Now if you don't have those, but the types come directly from the
schema, what do you do?

Let's say I define a simple type like this in a schema:

<xs:simpleType name="state">
         <xs:restriction base="xs:string">
             <xs:enumeration value="AL"/>

I just wouldn't know what nodes in the document have this type. Of
course, I know it if I write in my schema:

<xs:element name="state" type="dmv:state"/>

But this may or may not be a top-level definition in my schema. If it
is, then I can assume that any element called "state" will have type
state. So I validate the content of the element and there is no

What if this is not a top-level definition? Should an implementation
do the following:

1. Do a full validation.
2. While doing so, annotate nodes with appropriate type information.
3. Use that type information during revalidate.

But then, what happens if you do any of the following:

* xforms:insert
* submission with instance replacement

The newly created nodes won't have any type information associated
with them, unless you do a full revalidation. So should we expect that
full validation occurs "when needed" to determine node types?

Or am I missing something?

Feedback would be appreciated on this.


Orbeon Forms - Web Forms for the Enterprise Done the Right Way
Received on Thursday, 31 May 2007 22:26:41 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:48:21 UTC