W3C home > Mailing lists > Public > public-xformsusers@w3.org > January 2019

Re: The type property

From: C. M. Sperberg-McQueen <cmsmcq@blackmesatech.com>
Date: Wed, 9 Jan 2019 09:46:16 -0700
Cc: "C. M. Sperberg-McQueen" <cmsmcq@blackmesatech.com>, XForms <public-xformsusers@w3.org>
Message-Id: <8D86DA89-159E-483C-8764-9918FD5880A8@blackmesatech.com>
To: Steven Pemberton <steven.pemberton@cwi.nl>

> 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

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:37:50 UTC