> I'd like to be able to do something like this:
>
> <dcterms:extent>
> <foo:seconds>123</foo:seconds>
> <foo:bytes>123</foo:bytes>
> </dcterms:extent>
>
Presumably the answer is for
http://dublincore.org/documents/dcmes-qualifiers/ or a successor to give
some standard encoding schemes for number of bytes and seconds. It would
seem that the need would be universal enough for this to be justified.
I'm not sure that the term "byte" would be best; byte is taken by most of us
these days to mean 8-bit units, and hence equivalent to octet, but there are
still contexts where "byte" can mean 6, 7 or 9 bit units (historically
"byte" was first used for groups of between 1 and 6 bits, and has been used
for up to 36bit units). More complication is added by conversion of one to
the other in various ways, most common probably being conversion between
7bit ASCII encodings and 8bit ASCII encodings (with either the MSB always
zero, or else used with an encoding like UTF-8 or ISO-8859-1 which go beyond
the 7bit range, but which are equivalent to ASCII whilst within it).
"Octet" of course can only ever mean 8bit units (any other definition would
stretch etymology to breaking point :) and therefore <octets>123</octets> is
probably exactly what you mean by the vague <bytes>123</bytes>.
"Seconds" has it's own problems of definition, but they are both more
esoteric and harder to solve, so it would probably be okay to let it stand.
I would suggest supplementing it with the XML Schema duration datatype
(http://www.w3.org/TR/xmlschema-2/#duration) which ties in nicely with the
use of W3C DTF as one of the encodings for Dublin Core's Date, and is more
human-readable for times of more than about 120 seconds.
Arguably it can be more complicated to use it in calculations, but this
varies depending on the language used, and has reference code at
http://www.w3.org/TR/xmlschema-2/#adding-durations-to-dateTimes
For human pen-and-paper calculations it's arguably easier (and pretty much
how we learned to add times and dates in Primary School).
|