[DFDL-WG] ISO 8601 restricted profile and optional time zones

Steve Hanson smh at uk.ibm.com
Tue Mar 5 09:18:42 EST 2013


Today there is nothing in our pattern language that allows fractional 
seconds and/or timezones to be optional.  We don't have a [ ] syntax for 
example. I can imagine that being very useful.

Regards

Steve Hanson
Architect, Data Format Description Language (DFDL)
Co-Chair, OGF DFDL Working Group
IBM SWG, Hursley, UK
smh at uk.ibm.com
tel:+44-1962-815848



From:   Mike Beckerle <mbeckerle.dfdl at gmail.com>
To:     Steve Hanson/UK/IBM at IBMGB, 
Cc:     dfdl-wg at ogf.org
Date:   05/03/2013 13:23
Subject:        Re: [DFDL-WG] ISO 8601 restricted profile and optional 
time zones



Well, the definition of "I" can be whatever we want, but I suggest it 
follow the iso 8601 format "as practiced" in the real world. 

However, it can be strict or not about time zone, so long as there is some 
other calendar pattern which would let us parse "almost iso" data that 
lacks the timezone, fractional seconds, has one, or both of those.

But that can be entirely decoupled from what "I" pattern character means.

On Tue, Mar 5, 2013 at 5:56 AM, Steve Hanson <smh at uk.ibm.com> wrote:
I'd like to discuss allowing time zone to be optional with the 'I' 
calendar pattern symbol. It looks like the ISO 8601 restricted profile 
insists that time zone appears if there are time components. See below. 

Regards

Steve Hanson
Architect, Data Format Description Language (DFDL)
Co-Chair, OGF DFDL Working Group
IBM SWG, Hursley, UK
smh at uk.ibm.com
tel:+44-1962-815848 
----- Forwarded by Steve Hanson/UK/IBM on 05/03/2013 10:52 ----- 

From:        Steve Hanson/UK/IBM 
To:        "Costello, Roger L." <costello at mitre.org>, 
Cc:        David Hardcastle/UK/IBM at IBMGB, "Cranford, Jonathan W." <
jcranford at mitre.org>, "Garriss Jr., James P." <jgarriss at mitre.org> 
Date:        05/03/2013 10:51 
Subject:        Re: MBTK doesn't seem to support xsd:time correctly 


Roger, 

XML Schema spec talks about what is allowed in the value space of the XML 
Schema types, ie, what DFDL creates in its infoset. 

When parsing, DFDL uses a calendar pattern to identify what calendar 
components appear in the data, using dfdl:calendarPatternKind and 
dfdl:calendarPattern properties. If the pattern contains fractional 
seconds symbols ('SSS'), then at least one fractional second must appear 
in the data else it is an error.  If the pattern contains timezone symbols 
(eg, 'Z') then a time zone must appear in the data else it is an error. 

If you have data where the appearance of fractional seconds and/or time 
zone is optional, you might be able to use the calendar pattern 'I' symbol 
instead. This allows the data to match the time component of any of the 
'granularities' in the ISO 8601 restricted profile (
http://www.w3.org/TR/NOTE-datetime).  This will work if your data is of 
the form HH:mm[:ss[.SSS]][TZD].  Does your data match the ISO8601 
restricted profile? 

Testing the 'I' symbol this today I think there is a bug in MBTK where it 
only allows either no fractional seconds at all or exactly 3 fractional 
seconds (it should allow any number). I will raise a defect. Also, 
although MBTK allows time zone to be missing for 'I', I am not sure this 
is permitted by the restricted profile which seems to insist on time zone 
being present. I will raise this with the DFDL Working Group, as it seems 
to me that allowing time zone to be optional is useful. 

Regards

Steve Hanson
Architect, Data Format Description Language (DFDL)
Co-Chair, OGF DFDL Working Group
IBM SWG, Hursley, UK
smh at uk.ibm.com
tel:+44-1962-815848 



From:        "Costello, Roger L." <costello at mitre.org> 
To:        David Hardcastle/UK/IBM at IBMGB, Steve Hanson/UK/IBM at IBMGB, 
Cc:        "Cranford, Jonathan W." <jcranford at mitre.org>, "Garriss Jr., 
James P." <jgarriss at mitre.org> 
Date:        04/03/2013 18:24 
Subject:        MBTK doesn't seem to support xsd:time correctly 



Hello Steve and David,

Here I declare a time element of type xsd:time:

<xsd:element                  name="Time" 
                                 type="xsd:time"/>

According to the XML Schema specification the xsd:time datatype can 
optionally specify fractional digits, e.g.:

   11:30:30.333 +0500

and timezone is optional: 

   11:30:30 

However, if I use fractional digits I get an error and if I omit timezone 
I get an error.

I looked at the DFDL spec and I don't see any mention about not allowing 
fractional seconds or requiring timezone.

Is this a bug in MBTK?

/Roger



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

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

--
  dfdl-wg mailing list
  dfdl-wg at ogf.org
  https://www.ogf.org/mailman/listinfo/dfdl-wg



-- 
Mike Beckerle | OGF DFDL Workgroup Co-Chair | Tresys Technology | 
www.tresys.com


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.ogf.org/pipermail/dfdl-wg/attachments/20130305/71cb4fac/attachment-0001.html>


More information about the dfdl-wg mailing list