create_singleton_sequence() should support more types

Bug #867341 reported by Chris Hillery
6
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.

Revision history for this message
Chris Hillery (ceejatec) wrote :

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,
XQC_BOOLEAN_TYPE,
XQC_DAY_TIME_DURATION_TYPE,
XQC_HEX_BINARY_TYPE,
XQC_YEAR_MONTH_DURATION_TYPE

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.

Revision history for this message
Chris Hillery (ceejatec) wrote :

FYI, initial implementation (as described in previous comment) is in at r7670.

Revision history for this message
Chris Hillery (ceejatec) wrote :

Re-filing this as a feature request, and dropping the priority again as XQC is likely dead anyway.

Chris Hillery (ceejatec)
tags: removed: v2.1
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.