Re: The type property

> On Jan 9, 2019, at 9:18 AM, Steven Pemberton <steven.pemberton@cwi.nl> wrote:
> 
> https://www.w3.org/community/xformsusers/wiki/XForms_2.0#The_type_Property
> 
> "The datatype is associated with the string-value (as defined in [XPath 1.0]) of the instance node. It can be applied to both elements and attributes, but not to instance nodes that contain child elements."
> 
> In XDM, the type is associated with the node. Is there any objection to using that definition instead?
> https://www.w3.org/TR/2010/REC-xpath-datamodel-20101214/#ElementNode

For what it’s worth, it seems preferable to me.  In particular, two instances
of (what is for some or most purposes) the same string can plausibly be typed
two different ways:  “2019” can be an xs;decimal, an xs:integer, a xs:gYear, or an 
xs:string.

> 
> What is the objection to binding a type to an element with children?
> 

Any types for such elements are either vacuous (xs:anyType or xs:untyped)
or come from an XSD schema; I take that constraint as a signal that the
responsible WG wanted to signal that users should not expect full XSD support
for complex types (whatever the WG thought the users might think ‘support’
might mean).  

It’s also the case that other schema languages like Relax NG can use the XSD
simple types (since the ISO type definition library language seems not to have 
arrived yet, or to have arrived very very quietly), but wish to restrict the notion
of ‘type’ to types whose lexical representations don’t need any markup.  It’s
possible that the restriction you cite would make some readers happier about
the possibility that XForms could at some point abandon XSD and switch to
Relax NG.  I have no idea whether that might still matter to anyone.

Michael Sperberg-McQueen


********************************************
C. M. Sperberg-McQueen
Black Mesa Technologies LLC
cmsmcq@blackmesatech.com
http://www.blackmesatech.com
********************************************

Received on Wednesday, 9 January 2019 16:46:57 UTC