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@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@mitre.org>,
Cc:
David Hardcastle/UK/IBM@IBMGB,
"Cranford, Jonathan W." <jcranford@mitre.org>, "Garriss
Jr., James P." <jgarriss@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@uk.ibm.com
tel:+44-1962-815848
From:
"Costello, Roger
L." <costello@mitre.org>
To:
David Hardcastle/UK/IBM@IBMGB,
Steve Hanson/UK/IBM@IBMGB,
Cc:
"Cranford, Jonathan
W." <jcranford@mitre.org>, "Garriss Jr., James P."
<jgarriss@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