Project

Profile

Help

Feature #4989

closed

Make adaptive output method serialize dateTimeStamp as xs:dateTimeStamp instead of xs:dateTime

Added by Martin Honnen almost 3 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Low
Assignee:
-
Category:
-
Sprint/Milestone:
-
Start date:
2021-05-12
Due date:
% Done:

0%

Estimated time:
Legacy ID:
Applies to branch:
10
Fix Committed on Branch:
Fixed in Maintenance Release:
Platforms:

Description

Saxon JS 2.2 serializes an xs:dateTimeStamp with the adaptive output method as xs:dateTimeStamp(...) while Saxon Java (tested with HE 10.5) outputs xs:dateTime, whether the value is of type xs:dateTime or of the subtype xs:dateTimeStamp.

It seems Saxon Java could output e.g. xs:dateTimeStamp(...) for the result of e.g. current-dateTime() or other values which have a timezone and are xs:dateTimeStamps.

Currently serializeAtomicValue in the AdaptiveEmitter treats all xs:dateTime the same as other types and simply does return value.getPrimitiveType().getDisplayName() + "(\"" + value.getStringValue() + "\")";

If

            case StandardNames.XS_DATE_TIME:
                return value.getItemType().getDisplayName() + "(\"" + value.getStringValue() + "\")";

were used the output would be adapted to the actual type (i.e. xs:dateTime or xs:dateTimeStamp), I think.

Please register to edit this issue

Also available in: Atom PDF