dauwhe / epub31-bff

Straw-man spec for browser-friendly format for EPUB31

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unit for duration

HadrienGardeur opened this issue · comments

While a previous version of the specification used SMIL clock for this value, the current version is based on seconds.

Should we keep it in seconds or use ISO8601 duration for example?

video/audio in HTML5 use seconds, and duration in Media RSS too.

schema.org uses ISO 8601 for duration: http://schema.org/duration

Since we'll use that element in metadata, we might as well align and use ISO 8601 in the link object.

I'd want to know some history, and also try to avoid divergence from the EPUB media overlays spec where possible. Why are SMIL clock values different from ISO 8601 durations? I'd also note that SMIL clock values seem more human-readable than ISO 8601 durations.

ISO 8601 is pretty much universally used (along with RFC 3339, which is a profile of ISO 8601) for time and date.

I don't know why SMIL clock values are not based on ISO 8601, but since duration in schema.org is based on ISO 8601 I would rather avoid a situation where we use multiple standards to express a duration.

I do not know why SMIL went on a different path either. I tried to look at the SMIL spec but did not see any argumentation. (Or did not find it; the SMIL spec is HUGE.)

B.t.w., xsd:schema datatypes also rely on ISO 8601 and, as a consequence, so does RDF (which refers to xsd:schema).

That being said, it is a bit of a pain in the back side for duration. A 5 second duration seems to be PT5S in ISO 8601, as opposed to 5s in SMIL. If we need a general duration type with all its intricacies, than 8601 makes sense (and I would add: "alas!") but if we only want to express seconds then ISO8601 seems to be an overkill.

As an aside, I have an instinctive negative reaction to rely on a standard whose page says:

How can I get ISO 8601?

You can buy the full standard from the ISO Store, or from the ISO member in your country.

but we can also rely on xsd:schema, which is free of charge. But that is clearly the W3C person talking:-)

A 5 seconds duration should be just 5S in ISO 8601, I don't think that the PT part is necessary.

This is where it backfires that I have no access to the standard itself. If I look at

https://en.wikipedia.org/wiki/ISO_8601#Durations

that text suggests that the PT is necessary. I would be happy to be proven the contrary.

B.t.w.: https://xkcd.com/1179/ :-)

Yeah that sucks, I've seen examples for both PT5S and 5S...