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

[whatwg] A Selector-based metadata proposal (was: Annotating structured data that HTML has no semantics for)

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Sat, 16 May 2009 10:50:37 -0500
Message-ID: <dd0fbad0905160850s7242ed55vc291ab1bbe9bab91@mail.gmail.com>
(Could you try to be a little more careful about changing mail titles?
 These threads have splintered into half a dozen separate things in my
mail reader due to "Re:"s appearing in subjects.  It took me a while
to discover just what mail you were trying to respond to here.)

On Sat, May 16, 2009 at 7:12 AM, Toby A Inkster <mail at tobyinkster.co.uk> wrote:
[snip a lot of more editorial comments]
> Lastly, and most seriously, CRDF doesn't seem to distinguish between
> literals and resources. For example, with CRDF, I can do:
> <base href="http://example.net/" />
> <script type="text/crdf">
> @namespace ex "http://example.com/"
> a.foo {
> ?ex|property1: attr(title);
> ?ex|property2: attr(href);
> }
> </script>
> <a class="foo" href="http://example.org/" title="Quux">...</a>
> And I'd expect it to generate the following RDF/XML:
> <rdf:Description rdf:about="http://example.net/">
> ?<ex:property1>Quux</ex:property1>
> ?<ex:property2 rdf:resource="http://example.org/" />
> </rdf:Description>
> But it is not clear why a parser should generate the above, and not:
> <rdf:Description rdf:about="http://example.net/">
> ?<ex:property1 rdf:resource="http://example.net/Quux" />
> ?<ex:property2>http://example.org/</ex:property2>
> </rdf:Description>
> And there is a big difference in what these two pieces of RDF/XML mean.

Actually, I believe it would generate:
<rdf:Description rdf:about="http://example.net/">

In other words, it completely ignores the resource part of RDF.  This
is easy to fix, though.  Frex, change the example CRDF to:

<script type="text/crdf">
@namespace ex "http://example.com/"
a.foo {
 ex|property1: attr(title);
 ex|property2: attr(href) resource;

And it could then generate the first triple you posted.

Received on Saturday, 16 May 2009 08:50:37 UTC

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