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

Re: Digging through section 6.2.1 / multiple types for an element

From: <Nick_Van_den_Bleeken@inventivedesigners.com>
Date: Wed, 5 Apr 2006 14:05:38 +0200
To: "Allan Beaufour" <beaufour@gmail.com>
Cc: www-forms@w3.org, www-forms-request@w3.org
Message-ID: <OFF0626DD7.0D9E66F3-ONC1257147.0040E4B1-C1257147.004268D9@inventivedesigners.com>

www-forms-request@w3.org wrote on 04/05/2006 01:09:44 PM:

> 
> I've been digging into section 6.2.1 to figure out exactly how to
> handle an element with mutiple type definitions on it (ie. schema,
> xsi:type, bind type="").
> 
> My conclusion is that multiple schema types must have a "natural
> inheritance hierachy". So if type X is associated to the element by
> schema, and type Y is associated by bind type="", type Y needs to be
> derived from type X. This might have been obvious to everyone else but
> me, but I thought I'd share my "findings":
> 
> For XForms we define the type order in section 6.2.1:
> "1) An XML Schema associated with the instance data.
> 2) An XML Schema xsi:type attribute in the instance data.
> 3) An XForms type constraint associated with the instance data node
> using XForms binding."**
> 
[http://www.w3.org/TR/2006/REC-xforms-20060314/slice6.html#model-using-atomic]
> 
> How schema associated types and xsi:type interact naturally belongs in
> schema-land, and in section 6.1.1 we define the behaviour of bind
> type="":
> "The effect of this model item property is the same as placing
> attribute xsi:type on the instance data."
> 
[http://www.w3.org/TR/2006/REC-xforms-20060314/slice6.html#model-prop-type]
> 
> So how bind type="" mixes with other types also belongs in schema
> land, which says:
> "1.2.1.2.4 If there is also a processor-stipulated type definition,
> the ·local type definition· must be validly derived from that type
> definition given its {prohibited substitutions}, as defined in Type
> Derivation OK (Complex) (§3.4.6) (if it is a complex type definition),
> or given the empty set, as defined in Type Derivation OK (Simple)
> (§3.14.6) (if it is a simple type definition)."
> [http://www.w3.org/TR/xmlschema-1/#cvc-elt]

But if this is the case, then when you have an attribute of type string in 
your schema you can't restrict it by using a type contsraint to an URI by 
using anyURI? Or am I reading 'Type Derivation OK (Simple)' wrong?

> 
> ** One can argue what exactly is meant by the introduction to the 
> order though:
> "The set of facets associated with a model item must be determined by
> the following list, as if it were processed in the given order. When
> multiple datatype restrictions apply to the same model item, the
> combination of all given restrictions must apply."
> But if my conclusion does not hold, then there is something wrong in
> section 6.1.1 (at least).
> 
> --
> ... Allan
> 



--------------------------------------------------
Inventive Designers' Email Disclaimer:

http://www.inventivedesigners.com/email-disclaimer

Received on Wednesday, 5 April 2006 12:05:39 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Saturday, 10 March 2012 06:22:03 GMT