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

RE: XForms Basic and Schema Validation

From: Mark Birbeck <mark.birbeck@x-port.net>
Date: Tue, 9 May 2006 20:00:26 +0100
To: <www-forms@w3.org>
Cc: <ht@inf.ed.ac.uk>
Message-ID: <007101c6739a$d56a7740$7e01a8c0@Jan>


> Okay.
> Please take a look at this:
> <complexType>
>       <simpleContent>
>         <extension base="integer">
>           <xsd:attribute name="test"  type="integer" use="required"/>
>         </extension>
>       </simpleContent>
>     </complexType>
> We agree that this is a complex type with simple content.

Yes, definitely.

> When Henry wrote: "The validation semantics of (1) --
> (3) are all defined in terms of properties of the
> corresponding datatype.", I toke that as this complex type
> would be regarded as a datatype which can be a mistake from
> my part.

So, in your example above the 'integer' datatype would be used for the
*content* of @test, as well as the *content* of whatever element you apply
this complex type to. These two applications of 'datatype' correspond to
points (1) and (3) in Henry's list, and in my reading of his reply to you I
think it was these various uses that he was getting at.

> Henry, could you clarify if the above type definition would 
> qualify as being name a datatype or should it be named a 
> complex type with some simple content which is a datatype?

Pretty much the latter...although in my understanding of 'simple content',
it is 'datatype plus attributes'. In other words, simple content is the
combination of some element content *and* possibly attributes, and it's the
*content* of the element that is a simple type.

> Maybe the term datatype cannot be used in XForms as it is today, e.g. 
> maybe datatype is not an actual component you can reference?

I think it *is* something we can reference in the XForms spec, since the
term is used all the way through the second part of XML Schemas. But I think
it has been used incorrectly in too many places so far, so we'd need to all
be in agreement on the terminology before we then went back and worked out
what was actually meant.

The term that XML Schema uses when it doesn't care if something is a simple
type or a complex type is just 'type' or 'defined type'. Otherwise, if you
want to talk about a 'type' that is the 'stuff' that goes inside an
attribute or inside an element (that is not nillable and doesn't have child
elements), then I think the term 'datatype' is perfectly fine.



Mark Birbeck
x-port.net Ltd.

e: Mark.Birbeck@x-port.net
t: +44 (0) 20 7689 9232
b: http://internet-apps.blogspot.com/
w: http://www.formsPlayer.com/

Download our XForms processor from
Received on Tuesday, 9 May 2006 19:01:40 UTC

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