W3C home > Mailing lists > Public > public-rdf-in-xhtml-tf@w3.org > January 2008

Re: running tests locally

From: Mark Birbeck <mark.birbeck@formsPlayer.com>
Date: Sun, 6 Jan 2008 23:21:07 +0000
Message-ID: <a707f8300801061521u3049b5b0g5fb9b71bac34bf2d@mail.gmail.com>
To: "Ben Adida" <ben@adida.net>
Cc: RDFa <public-rdf-in-xhtml-tf@w3.org>

Hi Ben,

That's an excellent idea. It also fits into something I've been
working on for a while, which is the ability to modify documents that
you don't control, via the URL used to obtain that document.

In our Sidewinder implementation, we have the ability to specify
<meta> and <link> that are to be added to a document, by placing them
in the URL that is used to retrieve that document. Why that's useful
is described here:

  <http://www.swcube.com/node/1267>

The way we express this is via an XPointer syntax. For example, the
following URL:

  <http://www.google.com/reader#meta(width=900,height=500,autohide,position=top)>

would cause Sidewinder to load the Google Reader page, and then insert
the following meta elements into the document, before rendering it:

  <meta name="width" content="900">
  <meta name="height" content="500">
  <meta name="autohide" content="true">
  <meta name="position" content="top">

Sidewinder understands these values regardless of whether they were in
the document originally, or were provided on the URL. (And you won't
be surprised to learn that these values will show up in the parsed
triples, too, which is very useful.)

Also, '#link()' can be used in the same way, with the nice additional
feature that new stylesheets can be loaded to customise the look and
feel of a document.

My intention is to propose this whole 'document modification via the
URL' mechanism as a note, possibly to the W3C, and in it would be
other XPointer values, such as '#base()' and '#script()'.

So, if we were to use an XPointer syntax for the purpose that you are
proposing, it would be 'future compatible' with the more generic
mechanism I'm working on. My plans for '#base()' would be something
like this:

  <file:///c:/t1.html#base(http://rdfa.info/testsuite/test1.html)>

This would work in Sidewinder, but it could also be made to work in
JavaScript parsers, and even in Operator-style extensions, since all
you need to do is obtain the 'current URL' and then crack open the
XPointers before doing any RDFa parsing.

What do you think?

Regards,

Mark


On 02/01/2008, Ben Adida <ben@adida.net> wrote:
>
>
> Hi all,
>
> I have an action to propose a method for running tests locally.
>
> Rather than modify the tests to fit this purpose, I propose that we ask
> conforming parsers to accept a BASE parameter that indicates where the
> HTML+RDFa came from, and that is functionally equivalent to having a
> BASE element with that specified URI.
>
> This tweak is likely necessary for many parsers anyways, especially
> those that are run on static files without an indication of a URI. The
> only place where this gets trick is for parsers that are built into
> browsers, e.g. the RDFa bookmarklets and Operator. That said, I think we
> can find solutions for those, too, and effectively abstract away this
> problem into a parser-specific issue.
>
> Thoughts?
>
> -Ben
>
>


-- 
  Mark Birbeck, formsPlayer

  mark.birbeck@formsPlayer.com | +44 (0) 20 7689 9232
  http://www.formsPlayer.com | http://internet-apps.blogspot.com

  standards. innovation.
Received on Sunday, 6 January 2008 23:21:12 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 8 January 2008 14:15:20 GMT