Copyright © 2003 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C liability, trademark, document use, and software licensing rules apply.
1 Motivation
2 Types of Metadata in XHTML Documents
2.1 Putting it all together
2.1.1 Statements About the Containing Document
2.1.2 Statements About Other Resources
2.1.3 Avoiding Ambiguity Using External Resources
2.2 Carrying Metadata
2.2.1 RDF
3 bibl
The role of this document is to begin the discussion about XHTML 2.0 and metadata, and it will unapologetically attempt to put RDF at the centre of XHTML's metadata story. For too long now RDF has had to shyly stand in the corner at parties it has not even been invited to. It is constantly accused of being the most obtuse set of standards ever to emerge from the W3C, widely regarded as irrelevant. Yet ironically, every day millions of web users are kept up to date on changes to web sites and blogs using RSS - a simple syndication structure specified in RDF. RDF must be doing something right.
An essential part of the XHTML metadata story, will therefore be to make use of the principles of RDF. A secondary goal will be to harmonise as much as possible with the XML mark-up for RDF. By principles we simply mean that the whole notion of triples and statements will be at the centre of what we do. But in bringing these principles into XHTML, we will also aim to make it as easy as possible for RDF/XML parsers to process metadata contained in XHTML documents.
There are a number of sets of useful meta information that may be contained in, or relate to, an XHTML document:
There may be information about the document itself; who wrote it and when, the document's subject matter, and so on.
There may be further information about some of this document metadata; not only might we indicate the name of the author, but we might also mark-up metadata to indicate their contact information.
There may be information about words used in the text; an abbreviation may be marked-up with the full text version, or the word "yesterday" may be tagged as being a date with a value of "2004-01-01".
And finally, there may be information about items completely unrelated to the document; there may be meta information about a company or country.
To introduce the issues we'll go through some examples of each of these, using the RDF notion of triples.
[Big snip of introductory material]
According to 7.2.1 of [RDF-SYNTAX] it is possible to begin parsing for RDF at a set of elements that are not in the RDF namespace, provided that one of the RDF attributes is present. We make use of this feature to allow our XHTML markup to be understandable by an RDF parser.
The normal behaviour for meta is to make statements about the document that contains it:
<html xmlns:dc="http://purl.org/dc/elements/1.1/"> <head> <title>How to complete Memorandum cover sheets</title> <meta name="dc:creator">John Doe</meta> <meta name="dc:rights">© 1997 Acme Corp.</meta> <meta name="dc:subject">corporate,guidelines,cataloging</meta> <meta name="dc:date">1994-11-06T08:49:37+00:00</meta> </head> ...
However, if we want to make our metadata available to an RDF parser, we need an RDF attribute on
our meta elements. We need to have a root meta that ensures the subject is the
document:
<html xmlns:dc="http://purl.org/dc/elements/1.1/"> <head> <title>How to complete Memorandum cover sheets</title> <meta rdf:about="#"> <meta rdf:type="dc:creator" rdf:value="John Doe" /> </meta> </head> ...
| Editorial note | |
| This is the only way I can see to get this to work ... otherwise we lose the rdf:type. | |
| Editorial note | |
This could also be abbreviated to <meta rdf:about="#" dc:creator="John Doe" />. What's
the consequence for validation of many attributes ini different namespaces?
| |
Sometimes we need to be able to make statements about resources within the document,
or resources outside of the document. For example, we may know that the resource identified by
http://people.com/TonyBlair has a con:fullName of "Tony Blair".
We could place this in our document, as follows:
<html xmlns:dc="http://purl.org/dc/elements/1.1/"> <head> <title>How to complete Memorandum cover sheets</title> <meta rdf:about="#"> <meta rdf:type="dc:creator" rdf:value="John Doe" /> </meta> <meta rdf:about="http://people.com/TonyBlair"> <meta rdf:type="con:fullName" rdf:value="Tony Blair" /> </meta> </head> ...
| Editorial note | |
Another way to do this would be to put rdf:about in the schema for head, with
a fixed value of "#". That would make all meta elements that are children of head
and that have an RDF attribute, take the containing document as their subject. The problem with that though is
I think it makes it difficult to then make the statements about Tony Blair, that we have done in the example.
| |
Again, relying on 7.2.1 of [RDF-SYNTAX] we assume that the presence of an attribute in the RDF namespace would causee an RDF parser to parse this:
I stayed in the <meta rdf:resource="http://www.examples.org/city#london">capital</meta> for a week.
into this:
@prefix city: <http://www.examples.org/city#> . <> :meta city:london .
by beginning at 7.2.21. Note that the inner content should be ignored.
| Editorial note | |
No matter which way I tried to twist and turn, I could not see how to stop the element's URI-string-value
from being the predicate. I therefore felt that the all embracing xhtml2:meta was better than
allowing anything, and so ending up with xhtml2:span, xhtml2:div and so on.
| |
A browser could render something smart if the author has made anything available:
<html xmlns:dc="http://purl.org/dc/elements/1.1/"> <head> <title>How to complete Memorandum cover sheets</title> <meta rdf:about="#"> <meta rdf:type="dc:creator" rdf:value="John Doe" /> </meta> <meta rdf:about="http://people.com/TonyBlair"> <meta rdf:type="con:fullName" rdf:value="Tony Blair" /> </meta> </head> <body> <div1> Tomorrow the <meta rdf:resource="http://people.com/TonyBlair">Prime Minister</meta> is expected to fly to ... </div1> </body> </html>
This could be rendered something like this:
