Really Small XML Durations

Brent Putman putmanb at georgetown.edu
Wed Jun 7 17:54:18 EDT 2017



On 6/7/17 5:44 PM, Klingenstein, Nate wrote:
> I had been using PT1S.  When asked, I changed that to PT0.01S(and
> apparently nothing exploded and users report it “working”) but it
> feels janky as heck.

That is valid per the XML Schema definition for the 'xs:duration' type [1].

"... The number of seconds can include decimal digits to arbitrary
precision.

... Similarly, the value of the Seconds component allows an arbitrary
unsigned decimal. Following [ISO 8601]
<https://www.w3.org/TR/xmlschema-2/#ISO8601>, at least one digit must
follow the decimal point if it appears. That is, the value of the
Seconds component must conform to the pattern |[0-9]+(\.[0-9]+)?|.  ...  "

As to whether the various libraries that we use actually parse and use
that correctly, I can't confirm with certainty without going and
looking and/or testing.  But I would say that if you're doing it and
it's now throwing an error, that's a good sign.


[1] https://www.w3.org/TR/xmlschema-2/#duration



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://shibboleth.net/pipermail/users/attachments/20170607/0f3bfd14/attachment-0001.html>


More information about the users mailing list