W3C home > Mailing lists > Public > public-qt-comments@w3.org > November 2004

RE: Is xdt:anyAtomicType itself atomic?

From: Ashok Malhotra <ashok.malhotra@oracle.com>
Date: Thu, 11 Nov 2004 09:30:23 -0800
To: "Paul J. Lucas" <plucas@bea.com>, Michael Kay <mhk@mhk.me.uk>
CC: public-qt-comments@w3.org
Message-ID: <20041111093023316.00000004060@amalhotr-pc>

Paul, you said ...
> numeric = xs:integer | xs:float | xs:double

Shoudn't that be  
numeric = xs:integer | xs:decimal | xs:float | xs:double


All the best, Ashok

-----Original Message-----
From: public-qt-comments-request@w3.org [mailto:public-qt-comments-request@w3.org] On Behalf Of Paul J. Lucas
Sent: Wednesday, November 10, 2004 6:08 PM
To: Michael Kay
Cc: public-qt-comments@w3.org
Subject: RE: Is xdt:anyAtomicType itself atomic?


On Thu, 11 Nov 2004, Michael Kay wrote:

> What practical difference does it actually make whether 
> xdt:anyAtomicType is an atomic type or not?

	The issue arrose indirectly during the implementation of our
	XQuery engine.  As part of our type system (which does full
	structural typing in addition to named typing), we've defined a
	"convenience" type to the developer:

		numeric = xs:integer | xs:float | xs:double

	I'm not clear on the exact details, but a developer who does
	our run time presumeably has the type of an expression set to
	numeric for things like addition, subtraction, etc.  Of course
	at runtime, there are actual values that also have a type.  The
	developer wanted to be able to ensure that an argument to
	something that expects an atomic type really is atomic.  A
	particular value had the type numeric, so he asked:

		T.isAtomic()

	He was surprised that it returned false.  I generalized his
	case: if numeric should be considered atomic, then so should
	anyAtomicType.  Hence my question to the committee.

	We currently have anyAtomicType defined as a union and, as far
	as we can tell, it makes no difference... except in the case at
	hand.  I pointed out that he can get what he wants by instead
	doing:

		T <= anyAtomicType

	So the issue may (?) be moot.

	- Paul
Received on Thursday, 11 November 2004 17:30:59 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:57:02 UTC