: Most invariant URI to refer to a HTML5 element from w3.org? If one is in a situation where you are required to use a URI (simple strings would not do)...how would you refer to the concept
If one is in a situation where you are required to use a URI (simple strings would not do)...how would you refer to the concept of an HTML5 element ("div", "li", etc.)?
As a starting point for what an answer to this question might look sort of like, here is a URL for div under w3.org:
www.w3.org/TR/html-markup/div.html
XHTML had namespaces, so you might have built on that:
www.w3.org/1999/xhtml/
But even then, how would you have referred to div, specifically? www.w3.org/1999/xhtml/div?
(I don't know any precedent for how to combine them, only to invoke as <div xmlns="http://www.w3.org/1999/xhtml/">...</div>. Did any such precedent ever arise to produce a combined URI from a namespace and an element?)
Properties of a good solution:
All HTML5 elements covered, each with a separate unique URL (or URN... urn:html5:div?)
Defined invariantly by w3c.org or similar, in a place where they promise to obey the Cool URIs don't change principle
Though not as important as the other requirements, it would be ideal if there were some machine-processable information returned when the URI was fetched (list of legal attributes, etc.)
More posts by @Gloria169
1 Comments
Sorted by latest first Latest Oldest Best
Each W3C standard offers stable URIs for different maturity levels and versions.
The HTML5 specification has an URI which always points to the most recent version: www.w3.org/TR/html5/
Currently, it’s a "Last Call Working Draft", and this version has the URI: www.w3.org/TR/2014/WD-html5-20140617/
You can link to each element and attribute in this specification. For example, the div element:
most recent version (not necessarily stable): www.w3.org/TR/html5/grouping-content.html#the-div-element Last Call Working Draft from 2014-06-17: www.w3.org/TR/2014/WD-html5-20140617/grouping-content.html#the-div-element Candidate Recommendation from 2014-04-29: www.w3.org/TR/2014/CR-html5-20140429/grouping-content.html#the-div-element etc.
As HTML elements are not "the same" across different HTML versions (and even not across different drafts of the same HTML version), it probably wouldn’t make sense to use URIs that don’t point to a specific version of the specification. For example, think of the u element: In HTML5, it was obsolete for a long time, but then re-introduced with a different meaning than it had in HTML 4.01. And its definition might change again in the future (until HTML5 is published as Recommendation, after which comes the next version HTML 5.1).
Also note that W3C’s un-dated URIs aren’t necessarily stable, so the URI "http://www.w3.org/TR/html5/grouping-content.html#the-div-element" might change/break with the next publication.
While it would be possible for the HTML5 editors to include RDFa (giving metadata about the specification content) in the specification (like it’s the case with RDFa’s own spec), this is (at least, currently) not the case. So you’d have to parse the HTML for metadata.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.