IBM DFDL does not actually create an infoset, it emits events which contain the equivalent information. The events use Java or C objects. For Java, xs:dateTime, xs:date and xs:time are represented by javax.xml.datatype.XMLGregorianCalendar as stated in the Javadoc. Its toString() method calls toXMLFormat() method which says "Return the lexical representation of this instance. The format is specified in XML Schema 1.0 Part 2, Section 3.2.[7-14].1, Lexical Representation". " I assume then that the reason you see a  Z is because of XMLGregorianCalendar.  and not something IBM DFDL has added explicitly. What does Daffodil use?

Regards
 
Steve Hanson

IBM Hybrid Integration, Hursley, UK
Architect,
IBM DFDL
Co-Chair,
OGF DFDL Working Group
smh@uk.ibm.com
tel:+44-1962-815848
mob:+44-7717-378890
Note: I work Tuesday to Friday




From:        Mike Beckerle <mbeckerle.dfdl@gmail.com>
To:        DFDL-WG <dfdl-wg@ogf.org>
Date:        10/12/2018 17:53
Subject:        [DFDL-WG] Ambiguity or Correct ? Behavior of time zone in infoset        for xs:date
Sent by:        "dfdl-wg" <dfdl-wg-bounces@ogf.org>





I have a case where IBM DFDL and Daffodil differ, but I think both are correct so this is just a case where users have to tolerate variation in behavior:

<dfdl:format calendarPatternKind="implicit"  calendarTimeZone="UTC" />

<xs:element name="date1" type="xs:date" />

The data is "2010-12-30"

The DFDL spec says the parser behavior is as for pattern "yyyy-MM-dd", which does not have any character for time zone information.
So the time zone information is coming from the dfdl:calendarTimeZone="UTC" property.

But this question isn't about the parsing/unparsing behavior. It's about what date/time components end up in the infoset and how those get projected into XML by different DFDL implementations.

The problem is that there are multiple equivalent (according to XML/XSD and ISO 8601) representations in the infoset for this information.

Ex:
     <date1>2010-12-30+00:00</date1> (Note: current Daffodil behavior)
or
     <date1>2010-12-30Z</date1> (Note: current IBM DFDL behavior)

I believe these are 100% equivalent according to ISO8601 which is the standard for date/time referenced from XML/XSD.

If this is acceptable then there's no action here. It's just an equivalence that users have to expect.

So I'm just raising this to get opinions.

Comments?


Mike Beckerle | OGF DFDL Workgroup Co-Chair | Tresys Technology | www.tresys.com
Please note: Contributions to the DFDL Workgroup's email discussions are subject to the OGF Intellectual Property Policy
--
 dfdl-wg mailing list
 dfdl-wg@ogf.org
 
https://www.ogf.org/mailman/listinfo/dfdl-wg

Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number 741598.
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU