create_singleton_sequence() should support more types
Bug #867341 reported by
Chris Hillery
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Zorba |
New
|
Low
|
Chris Hillery |
Bug Description
Needs to be a big switch statement or function-pointer lookup table to call the appropriate ItemFactory method.
tags: | removed: v2.1 |
To post a comment you must log in.
I've implemented create_ singleton_ sequence( ), and also extended Zorba's external function functionality to support creating arbitrarily-typed atomic values using the same mechanism.
The current implementation supports only atomic values, which seems consistent with XQC's documentation. However, it does not support the following atomic types as yet:
XQC_BASE_ 64_BINARY_ TYPE, TIME_DURATION_ TYPE, BINARY_ TYPE, MONTH_DURATION_ TYPE
XQC_BOOLEAN_TYPE,
XQC_DAY_
XQC_HEX_
XQC_YEAR_
It also does not support XQC_QNAME_TYPE or XQC_NOTATION_TYPE, but given that this function operates in the absence of even a static context, it's not clear that it's possible to support this at all (since only a lexical QName could be passed in and there's nowhere to attempt to resolve the prefix).
It also does not support XQC_UNTYPED_ ATOMIC_ TYPE or XQC_ANY_ SIMPLE_ TYPE; it is not clear that this has meaning.