RE: N3 syntax in XHTML 2 [was RE: DC in XHTML2]

Hi Sjoerd,

> I think actually using N3, instead of a solution based on N3, 
> has some extra advantages.
> 
> First, it allows you to use the full power of RDF in HTML. Take f.e. 
> collections, which would become a big mess of link and/or 
> meta elements with the current attributes.

I hope not! There are some abbreviated forms of the syntax that should work.
Feel free to post some examples of what you are thinking of, so that we can
see whether XHTML 2 works for them.



> Secondly it will make more people aware of N3.

There's no point in making people aware of it for its own sake. It needs to
be right for our problem.



> N3 is a very pretty syntax...

I do agree! If I may be permitted a little history...The first document I
wrote about XHTML 2 and metadata [1] argued for putting RDF right at the
heart of XHTML 2's metadata story. In addition, I was trying to make it so
that if an RDF/XML parser was applied to an XHTML 2 document it would get
triples with no additional knowledge about the document:

  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.

This proved not to be possible -- although I did almost crack it :( -- and
so my next draft took inspiration from N3. I was looking to provide an XML
version of the syntax, so that constructs like this [2]:

  <> dc:creator [ con:fullName "John Doe" ] .

could be marked up like this:

  <html
   xmlns:dc="http://purl.org/dc/elements/1.1/"
   xmlns:con="http://www.w3.org/2000/10/swap/pim/contact#"
  >
    <head>
      <title>How to complete Memorandum cover sheets</title>
      <meta property="dc:creator">
        <meta property="con:fullName">John Doe</meta>
      </meta>
      <meta property="dc:rights">&copy; 1997 Acme Corp.</meta>
      <meta property="dc:subject">corporate,guidelines,cataloging</meta>
      <meta property="dc:date">1994-11-06T08:49:37+00:00</meta>
    </head>
    ...

Note the anonymous node implied by the dc:creator property, and the close
resemblance between the two syntaxes. In fact, if you jiggle your N3 layout:

  <> dc:creator
    [ con:fullName "John Doe" ] .

it looks uncannily like this ;):

  <meta property="dc:creator">
    <meta property="con:fullName">John Doe</meta>
  </meta>

So, I agree with you that N3 is great. However, I think it is wrong for
XHTML 2, because the most important thing that has been done with XHTML 2 is
to be clear about what the mark-up means *in terms of RDF*. External
processors can now extract metadata from documents, regardless of how much
or little of RDF an author has understood--and authors themselves can
leverage their already existing understanding of HTML <meta>, <link> and
<a>. Both sides of this equation are *crucial* for the much-delayed (and
long overdue) Semantic Web.

Anyway, just to finish the history part--because I don't want people to use
the wrong syntax in XHTML 2--the syntax just described was not to last. A
growing requirement of the XHTML 2 metadata story, as conveyed to us by the
RDF-world was that the 'clickable links' should ideally provide metadata 'as
is'. This meant that if an author marked up the following (this is a
test-case that was provided to us):

  <p>
    This document is licensed under a
    <a rel="cc:license"
href="http://creativecommons.org/licenses/by-sa/2.0/">
        Creative Commons License
    </a>
    which, among other things, requires that you provide 
    attribution to the author,
    <a rel="dc:creator" href="http://ben.adida.net">Ben Adida</a>.
  </p>

we would want it to say:

  <> cc:license <http://creativecommons.org/licenses/by-sa/2.0/>
  <> dc:creator <http://ben.adida.net>

(For those not familiar with N3 the "<>" bit just means "the current
document". These statements are about the current document, telling us about
it's license and creator .)

At the time everyone said that this would be a 'nice to have', but the more
we looked at it, the clearer it became that this actually would be the
equivalent of the 'killer app' for XHTML 2 and metadata. In the latest draft
[3], which is still N3-inspired, this mark-up would have resulted in the
following triples, which would not have been of much use:

  _:a cc:license <http://creativecommons.org/licenses/by-sa/2.0/>
  _:b dc:creator <http://ben.adida.net>

(To emphasise, the draft referred to is incorrect, and XHTML 2 now does what
we need it to. Of course, like a big squidgy ball, when you push down on one
side the other side pops up, and as a consequence of this change we now have
a problem with anonymous nodes! Still...)



> ...and it could improve the image of RDF.

Some would say that RDF/A and XHTML 2 are already improving the image of RDF
;)



> Thirdly, it will improve the chances of microformats using 
> RDF. At some point, microformats will require more than some 
> simple attributes, and someone will invent some syntax to put 
> more information into one attribute. If full N3 is already 
> available in XHTML2, it is likely that people will push to 
> use the standard N3, instead of a proprietary syntax.

I have to confess...and this is probably heresy!...but I don't have the same
excitement about microformats as everyone else. I think they are far more
limited than people think--they should be called siloformats--but that's
another story. There's an odd trend at the moment, whereby anything that
appears to arise spontaneously is be definition good, whilst anything that
is the result of discussion, planning and committees is bad. Of course not
everything planned is good (far from it), but equally not everything that
cuts corners and consists of a few lines is good, either.

Regards,

Mark

[1] <http://www.formsplayer.com/notes/xhtml-meta-data-02.html>
[2] <http://www.formsplayer.com/notes/xhtml-meta-data-03.html>
[3] <http://www.w3.org/MarkUp/2004/rdf-a.html>


Mark Birbeck
CEO
x-port.net Ltd.

e: Mark.Birbeck@x-port.net
t: +44 (0) 20 7689 9232
w: http://www.formsPlayer.com/
b: http://internet-apps.blogspot.com/

Download our XForms processor from
http://www.formsPlayer.com/

Received on Friday, 10 June 2005 11:21:22 UTC