support for the xs:dateTimeStamp type

Bug #924754 reported by Sorin Marian Nasoi
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Zorba
Fix Released
High
Cezar Andrei

Bug Description

I bumped into the following issue while trying to run the following XQuery 3.0 test:
exists(fn:timezone-from-dateTime(xs:dateTimeStamp("2011-07-28T12:34:56-08:00")))

Zorba returned:
static error [err:XPST0017]: "xs:dateTimeStamp": function with arity 1 not declared

Looking into the latest F&O Spec for XQuery 3.0 I see that a new type, xs:dateTimeStamp was added for the implementations that "support XSD 1.1".

I have a few questions:
1) should Zorba support the new type, xs:dateTimeStamp?
If so, some function signatures need to be changed, for instance:
Now, in Zorba,
fn:current-dateTime() returns a xs:dateTime
instead of a xs:dateTimeStamp as stated in the http://www.w3.org/TR/xpath-functions-30/#func-current-dateTime.

2) Should Zorba support constructor functions for xsd types ? Meaning should we add functions like:
fn:unsignedInt($arg as xs:anyAtomicType?) as xs:unsignedInt?

3) There are 2 tests in Zorba( xquery_1_0 and xquery_1_1) that check if all the functions from the fn: namespace of the F&O spec 1.0 and 3.0 are implemented in Zorba.
The problem with these tests is that they only check the function names and their corresponding arities; they do not check if the types of the parameters are correct.
This is the reason why the change in the signature of the fn:current-dateTime() that should now return a xs:dateTimeStamp was not picked up by these tests.

IMO we should update these 2 tests to also check the parameter types: one problem I see here is that the introspection module only provides function to get the function name and arity, not the types of the parameters.

Thanks for the help,
Sorin

Related branches

Revision history for this message
Markos Zaharioudakis (markos-za) wrote :

Sorin, I cannot answer these questions. You should report them in zorba-dev. It's probably Dana who should ultimately answer them. Furthermore, regarding potential implementation of xs:dateTimeStamp, it should be done by the same person who implemented datetime (in src/zorbatypes). This was either you or Nicolae, I don't remember.

Changed in zorba:
assignee: Markos Zaharioudakis (markos-za) → Sorin Marian Nasoi (sorin.marian.nasoi)
Changed in zorba:
assignee: Sorin Marian Nasoi (sorin.marian.nasoi) → Cezar Andrei (cezar-andrei)
importance: Undecided → Low
Revision history for this message
Sorin Marian Nasoi (sorin.marian.nasoi) wrote :

I added tags: FOTS and TYPESYSTEM to this issue.

tags: added: fots testsystem
Changed in zorba:
importance: Low → Medium
assignee: Cezar Andrei (cezar-andrei) → Nicolae Brinza (nbrinza)
milestone: none → 2.8
Changed in zorba:
importance: Medium → High
Changed in zorba:
assignee: Nicolae Brinza (nbrinza) → Cezar Andrei (cezar-andrei)
milestone: 2.8 → 3.0
Chris Hillery (ceejatec)
Changed in zorba:
milestone: 3.0 → 2.9
Chris Hillery (ceejatec)
tags: added: hotlist
Changed in zorba:
status: New → In Progress
Revision history for this message
Sorin Marian Nasoi (sorin.marian.nasoi) wrote :
Revision history for this message
Cezar Andrei (cezar-andrei) wrote :

We decided that xsd1.0 superseeds and deprecates xsd1.0, so only xsd1.1 can be set to true.

Changed in zorba:
status: In Progress → Fix Committed
Changed in zorba:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.