This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 5267 - [DM] xs:dayTimeDuration and xs:yearMonthDuration are not primitive simple types
Summary: [DM] xs:dayTimeDuration and xs:yearMonthDuration are not primitive simple types
Status: CLOSED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: Data Model 1.0 (show other bugs)
Version: Recommendation
Hardware: PC Windows XP
: P5 minor
Target Milestone: ---
Assignee: Anders Berglund
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-11-13 17:27 UTC by Henry Zongaro
Modified: 2008-09-16 19:54 UTC (History)
0 users

See Also:


Attachments

Description Henry Zongaro 2007-11-13 17:27:38 UTC
Bug 4984 correctly points out that xs:untyped should not be listed as a primitive simple type in Section 3.2.  In addition, the types xs:dayTimeDuration and xs:yearMonthDuration should not be on the list either, as these are both derived rather than primitive simple types.  Removing them would bring the number of primitive simple types to 21.

I propose the following rewording:

[Definition: There are 21 primitive simple types: the 19 defined in Section 3.2 Primitive datatypesXS2 of [Schema Part 2], xs:untypedAtomic and xs:anyAtomicType], defined in 2.6 Types.
Comment 1 Frans Englich 2007-11-14 08:47:17 UTC
It feels like a change like this can have dramatic effects, in particular on operator binding. Maybe it is as it is, for being somewhat aligned with the next version of Schema?

xs:integer is neither a primitive type according to W3C XML Schema 3.2, but it's probably as well listed all over the specs as primitive. I have a vague memory of that either XQuery or F&O explicitly said that xs:integer was considered as a primitive type even though it isn't.

In XQuery 1.0, H Glossary (Non-Normative), section xs:anyAtomicType are xs:integer and xs:untypedAtomic mentioned as primitive atomics.
Comment 2 Michael Kay 2007-11-14 09:11:57 UTC
These types aren't primitive, they are derived; but along with xs:integer they are specially recognized by the rules for operator binding and casting.
Comment 3 Michael Dyck 2007-11-14 21:10:31 UTC
(In reply to comment #1)
> 
> xs:integer is neither a primitive type according to W3C XML Schema 3.2, but
> it's probably as well listed all over the specs as primitive. I have a vague
> memory of that either XQuery or F&O explicitly said that xs:integer was
> considered as a primitive type even though it isn't.

You're maybe thinking of F+O section 17.1: "These four types [xs:untypedAtomic, xs:integer, xs:yearMonthDuration, and xs:dayTimeDuration] are not primitive types but they are treated as primitive types in this section." (Although I don't see why xs:untypedAtomic is "not primitive".) 
 
> In XQuery 1.0, H Glossary (Non-Normative), section xs:anyAtomicType are
> xs:integer and xs:untypedAtomic mentioned as primitive atomics.

Similarly in XQuery section 2.5.1, point 5.

Getting back to the Data Model spec, section 2.6.2 (under xs:anyAtomicType) also mentions xs:integer as a primitive atomic type.
Comment 4 Anders Berglund 2008-09-16 19:53:35 UTC
The WGs accepted the commentator's suggested replacement text at the 13 Nov 2007 telcon. Errata DM.E009.