zorba-coders team mailing list archive
-
zorba-coders team
-
Mailing list archive
-
Message #10492
[Bug 924754] Re: support for the xs:dateTimeStamp type
** Changed in: zorba
Assignee: Sorin Marian Nasoi (sorin.marian.nasoi) => Cezar Andrei (cezar-andrei)
** Changed in: zorba
Importance: Undecided => Low
--
You received this bug notification because you are a member of Zorba
Coders, which is the registrant for Zorba.
https://bugs.launchpad.net/bugs/924754
Title:
support for the xs:dateTimeStamp type
Status in Zorba - The XQuery Processor:
New
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
To manage notifications about this bug go to:
https://bugs.launchpad.net/zorba/+bug/924754/+subscriptions
References