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

Re: Request to publish HTML+RDFa (draft 3) as FPWD

From: Jonas Sicking <jonas@sicking.cc>
Date: Tue, 22 Sep 2009 13:50:43 -0700
Message-ID: <63df84f0909221350k50fbf908nf2746f848ec06a70@mail.gmail.com>
To: Shane McCarron <shane@aptest.com>
Cc: Henri Sivonen <hsivonen@iki.fi>, Mark Birbeck <mark.birbeck@webbackplane.com>, HTMLWG WG <public-html@w3.org>, RDFa mailing list <public-rdf-in-xhtml-tf@w3.org>
On Tue, Sep 22, 2009 at 1:43 PM, Jonas Sicking <jonas@sicking.cc> wrote:
> On Tue, Sep 22, 2009 at 1:07 PM, Shane McCarron <shane@aptest.com> wrote:
>>
>>
>> Jonas Sicking wrote:
>>
>> I would say there are two separate things that are missing:
>>
>> The most substantial one is how to do prefix mappings in a DOM or a
>> HTML document. Prefix mapping is currently defined using the
>> Namespaces in XML recommendation. However this recommendation only
>> defines how prefix mappings are done in a serialized XML document. I
>> hope we can all agree that neither DOMs (an in-memory datastructure)
>> or HTML documents are not XML documents.
>>
>> For example, if I have a DOM and I want to do map the prefix "foo",
>> which of the following algorithms should I use:
>> 1. Call Node.lookupNamespacePrefix as defined by DOM Level 3 using
>> "foo" as the prefix argument.
>> 2. Walk up the parent chain looking for an element with an attribute
>> with localName "foo" and namespace "http://www.w3.org/2000/xmlns/",
>> and then use the value of that attribute.
>> 3. Walk up the parent chain looking for an element with an attribute
>> with tagName "xmlns:foo", and then use the value of that attribute.
>> 4. Walk up the parent chain looking for either the attribute in 2 or
>> 3, and if both are specified use some prioritization order.
>> 5. Walk up the parent chain looking for either the attribute in 2 if
>> the document was parsed as XHTML, or attribute in 3 if the document
>> was parsed as HTML.
>> 6. Do something else?
>>
>> Any of 1 to 5 (as well as possibly 6) seems equally valid to me, and
>> as far as I can tell there really is no specified answer.
>>
>>
>> Nor should there be.  This presupposes a DOM-based processing model.  While
>> you *might* be using a DOM, you don't need to.
>
> Sure, but if you have a DOM, what do you do? One solution is certainly
> to say that "If you have a DOM, there is no way to extract RDFa data".
> This is certainly a possibility, but it does mean that it's impossible
> to

... to build a RDFa implementation in javascript, as javascript is
handed a DOM. I don't know if javascript implementations of RDFa is
something that's considered important.

/ Jonas
Received on Tuesday, 22 September 2009 20:51:47 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 22 September 2009 20:51:47 GMT