Re: <time> values in HTML5

On Nov 18, 2011, at 4:05 PM, Jeni Tennison wrote:

> Hi,
> 
> The all new <time> element has been specced out in the WHATWG version of the HTML(5) spec at:
> 
>  http://www.whatwg.org/specs/web-apps/current-work/multipage/text-level-semantics.html#the-time-element
> 
> (This isn't reflected in the W3C Editors Draft as yet but I guess it will be at some point.)
> 
> As specced, it (a) accepts a bunch of syntaxes that aren't in the lexical space of any XML Schema datatype and (b) accepts some values that aren't in the value space of any XML Schema datatype, namely timezones and weeks.
> 
> Looking at this from the perspective of extracting data into either RDF or XML systems, syntax variations aren't a particular issue, as values can be normalised to the standard lexical space for the relevant XSD type as they're extracted. However, there's simply no appropriate datatype to use when mapping the values that aren't covered by XML Schema.
> 
> I see XML Schema 1.1 [1] is at Candidate Recommendation stage. Is it too late to slip in a xs:timezone and a xs:gYearWeek? Or should HTML+RDFa 1.1 do like the XPath Data Model did [2] and add definitions for these types so it can use them? Or should the types be created in a completely different namespace? Or should values of these types go typeless into any RDF or XML generated from HTML5?
> 
> Any thoughts?

In the RDFa call, we said we would follow changes made to the <time> element to include a greater range of XSD datatypes. However, we did not discuss any non-XSD datatypes. My own feeling is that we should use XSD datatypes where there is a lexical match, and use a plain literal otherwise. If XSD is updated to include new datatypes, we can always provide support for them as well.

In any case, RDFa and the Microdata to RDF transform should provide consistent results.

Given the relative maturity of XSD, and its use across a number of RDF serializations, I don't see much value in providing datatypes that are defined elsewhere. The RDFWG has an ongoing discussion on what to do about unknown datatypes [3]. It's mostly about URIs that don't denote a datatype, but it also notes where RDF Semantics says "Typed literals whose type is not in the datatype map of the interpretation are treated as before, i.e. as denoting some unknown thing." [4]. This seems imply that such datatypes outside of the referenced aren't really useful. Perhaps someone (Dan?) can clarify this.

Gregg

> Jeni
> 
> [1] http://www.w3.org/TR/xmlschema11-2/
> [2] http://www.w3.org/TR/xpath-datamodel/#types-predefined
[3] http://lists.w3.org/Archives/Public/public-rdf-wg/2011Nov/thread.html
[4] http://www.w3.org/TR/rdf-mt/#DTYPEINTERP
> -- 
> Jeni Tennison
> http://www.jenitennison.com
> 
> 

Received on Saturday, 19 November 2011 00:43:21 UTC