W3C home > Mailing lists > Public > whatwg@whatwg.org > January 2009

[whatwg] RDFa is to structured data, like canvas is to bitmap and SVG is to vector

From: Shelley Powers <shelleyp@burningbird.net>
Date: Sat, 17 Jan 2009 14:35:43 -0600
Message-ID: <4972411F.10000@burningbird.net>
Henri Sivonen wrote:
> On Jan 17, 2009, at 20:33, Dan Brickley wrote:
>
>> Good question. I for one expect RDFa to be accessible to Javascript.
>>
>> http://code.google.com/p/rdfquery/wiki/Introduction -> 
>> http://rdfquery.googlecode.com/svn/trunk/demos/markup/markup.html is 
>> a nice example of code that does something useful in this way.
>
>
> Does this code run the same way on both DOMs parsed from text/html and 
> application/xhtml+xml in existing browsers without at any point 
> branching on a condition that is a DOM difference between 
> text/html-originated and application/xhtml+xml-originated DOMs?
>
I don't want to specifically look at just the one case, since it is not 
working in Safari, and IE8 and is too complex to debug right at this moment.

Generally, though, RDFa is based on reusing a set of attributes already 
existing in HTML5, and adding a few more. I would assume no differences 
in the DOM based on XHTML or HTML. The one issue that would occur has to 
do with the values assigned, not the syntax.

I put together a very crude demonstration of JavaScript access of a 
specific RDFa attribute, about. It's temporary, but if you go to my main 
web page, http://realtech.burningbird.net, and look in the sidebar for 
the click me text, it will traverse each div element looking for an 
"about" attribute, and then pop up an alert with the value of the 
attribute. I would use console rather than alert, but I don't believe 
all browsers support console, yet.

Access the page using Firefox, which is served the page as XHTML. Access 
it as IE8, which gets the page as HTML. You can tell the difference 
between my graphics are based in inline SVG, and will only show if the 
page is served as XHTML.

So, yes, with my quick, crude demonstration, DOM access is the same in 
both environments.

Shelley
Received on Saturday, 17 January 2009 12:35:43 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:09 UTC