This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
XPath 3.10.4 (http://www.w3.org/TR/xpath20/#id-constructor-functions) says For every atomic type in the in-scope schema types (except xs:NOTATION and xdt:anyAtomicType, which are not instantiable), a constructor function is implicitly defined. Functions and Operators 5.1 says Every built-in atomic type that is defined in [XML Schema Part 2: Datatypes Second Edition], except xs:NOTATION, has an associated constructor function; as do xdt:untypedAtomic, defined in Section 2.6 TypesDM and the two derived types xdt:yearMonthDuration and xdt:dayTimeDuration defined in 10.3 Two Totally Ordered Subtypes of Duration. These seem to suggest two different answers to the questions Q1: is there a constructor function for xsd:anyAtomicType? XPath seems to say no, F/O to say yes. Q2: are there constructors for user-defined atomic types among the in-scope types? XPath seems to say yes, F/O to say no. But then F/O continues A constructor function is not defined for xs:NOTATION since it is defined as an abstract type in [XML Schema Part 2: Datatypes Second Edition]. If the static context (See Section 2.1.1 Static ContextXP) contains a type derived from xs:NOTATION then a constructor function is defined for it. See 5.3 Constructor Functions for User-Defined Types. which suggests that there ARE constructors for user-defined types, at least if they are derived from NOTATION. Are these really in contradiction, or am I missing something?
The language book is correct in both counts.
F+O 5.1 says that built-in atomic types have constructor functions. F+O 5.3 says that user-defined atomic types have constructor functions. You seem to have read 5.1 as saying that *only* built-in atomic types have constructor functions, which it doesn't say... I don't think the specs are inconsistent about xdt:anyAtomicType either. F+O's phrase is Every built-in atomic type that is defined in [XML Schema Part 2: Datatypes Second Edition], except xs:NOTATION, has an associated constructor function; as do xdt:untypedAtomic, defined in Section 2.6 TypesDM and the two derived types xdt:yearMonthDuration and xdt:dayTimeDuration defined in 10.3 Two Totally Ordered Subtypes of Duration. The set of types described here does not include xdt:anyAtomicType. But it would do no harm to spell this out more explicitly. Michael Kay
We need to add a constructor function for anyAtomicType to the list of constructor functions listed in F&O section 5.1.
No Ashok, we should NOT add this. This datatype is an abstract datatype and should NOT have a constructor!
Ashok, not as I see it. It would counter act changes previously done concerning this(see bug #1526, for example). I neither see how it would make sense; anyAtomicType is an abstract type with no value space. Regards, Frans
Michael, In telcon 296 on April 18, 2006, the joint Query and XSLT working groups agreed that the XPath and XQuery specifications are correct and that no document changes are required. If this resolution is acceptable to you, please change the status of this Bugzilla entry to "Closed".
Closing bug because commenter has not objected to the resolution posted and more than two weeks have passed.