[whatwg] RDFa uses CURIEs, not QNames

On Fri, Aug 29, 2008 at 4:57 PM, Ben Adidawrote:
> Anne van Kesteren wrote:
>> As far as I can tell they both have the same (subset of) problems. They
>> create a level of indirection and require keeping namespace prefix
>> declarations around.
>
> It's important to note that, in our experience and in our design, the
> level of indirection is a feature, not a bug. One rarely uses a
> vocabulary for just one property.

The bug is in that attribute values are opaque strings unless told
otherwise (e.g. through a schema), so most processors won't know that
a particular attribute's value is a CURIE and that they need to copy
the namespace declaration and/or keep the prefix the same; and people
copy/pasting things will have to know it's a CURIE and they have to
find and copy/paste the namespace declaration too (and know where to
paste it).

The problem with QNames is not QNames by themselves (except for their
key+value nature, but that's another story), it's their use in
attribute values (e.g. in XSLT). QNames should probably have defined a
"string serialization" (such as the "James Clark's notation":
{namespace-uri}local-name) to be used by other specifications, or at
least the first major spec using QNames in attribute values (wasn't it
XSLT?) should have defined it (expecting others to follow the same
rule).

(note that I talked about attribute values, but the same is true for
element's text value)
-- 
Thomas Broyer

Received on Friday, 29 August 2008 08:34:47 UTC