Re: XForms Basic and Schema Validation

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

David Landwehr writes:

> 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. 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.

Datatypes don't appear in schemas.  Only simple type definitions and
complex type definitions.

> 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?

Neither.  It's a complex type definition, whose {content type} is a
simple type definition.  That simple type definition is the built-in
simple type definition called 'integer' in the XML Schema namespace.
The _semantics_ of that simple type definition are provided by the
'integer' datatype, as defined in section 3.3.13 of Part 2 of W3C XML
Schema v1.0 2nd edition [1].  Also in section 3.4.13 of Part 2 of W3C
XML Schema v1.1 Last Call PWD [2], which I recommend to you as being
clearer and more careful in its use of the words 'datatype' and
'simple type definition'.

> 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?

'datatype' may be exactly the word XForms want, or 'simple type
definition'.  I can't tell w/o more information.  It's precisely _in
order_ that the semantics can be referenced _without_ all the XML and
validation baggage that we define _both_ a datatype 'integer' _and_ a
simple type definition xs:integer, so different specs can use the
right thing for their needs.  For example, RDF are very careful to
talk about the _datatypes_, because _all_ they want is the semantics.

If XForms just want the semantics, use 'datatype'.  If they want the
XML syntax, and user-defined types and the mechanics of validation,
use 'simple type definition'.

> Mark Birbeck wrote:

> [Mark's expansion of what I meant is all correct, as far as I can tell
> from a quick readthrough]

Hope this helps,

ht

[1] http://www.w3.org/TR/xmlschema-2/#integer
[2] http://www.w3.org/TR/2006/WD-xmlschema11-2-20060217/#integer
- -- 
 Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh
                     Half-time member of W3C Team
    2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440
            Fax: (44) 131 650-4587, e-mail: ht@inf.ed.ac.uk
                   URL: http://www.ltg.ed.ac.uk/~ht/
[mail really from me _always_ has this .sig -- mail without it is forged spam]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)

iD8DBQFEYOrakjnJixAXWBoRApjUAJ95ytHYYJ+17cUlCElYsUJc+CKpeACeOFDr
wHY/1/ZFFTHfJHQLToWFILU=
=I6g2
-----END PGP SIGNATURE-----

Received on Tuesday, 9 May 2006 19:17:56 UTC