[whatwg] A Selector-based metadata proposal (was: Annotating structured data that HTML has no semantics for)
Tab Atkins Jr.
jackalmage at gmail.com
Sat May 16 08:50:37 PDT 2009
(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/">
<ex:property1>Quux</ex:property1>
<ex:property2>http://example.org/"</ex:property2>
</rdf:Description>
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;
}
</script>
And it could then generate the first triple you posted.
~TJ
More information about the whatwg
mailing list