Re: Default and empty CURIE prefixes in a non-XHTML host language

Hi Toby,

  thanks for your helpful comments!

2009-11-26 12:25 Toby Inkster <tai@g5n.co.uk>:
> Hmmm... this is a good point. I've tried to make my Perl RDFa parser as
> generic as possible, and allow XHTML-specific features (like treating
> <head> and <body> specially; understanding <base href>; etc) to be
> switched off. But I don't currently provide a way to change the default
> CURIE prefix from <http://www.w3.org/1999/xhtml/vocab#>.

Not sure if would already be urgent for you to extend your processor
accordingly.  AFAIK, RDFa has been integrated into XHTML, SVG Tiny,
OpenDocument is in progress, any other language (besides mine)?  Not sure what
requirements OpenDocument has w.r.t. prefixes.  BTW, it seems that on the RDFa
wiki there is currently no collection of host languages that embed RDFa; maybe
it would make sense to start such a list.

> Nor do I provide a way to define additional keywords. If I were to add
> such a feature, what do you think would be more useful - allow
> additional keywords in @rel/@rev; or allow them to be used in any
> attribute?

Allowing such keywords only in @rel/@rev is IMHO too much of an HTML legacy.
I think it would keep the specs cleaner and thus easier to understand and
implement if those keywords were instead implemented as prefixless CURIEs --
and thus also usable in other RDFa attributes.  Why not also have
@typeof="StartPage" (just made up this HTML-like example) where we can have
@rel="next"?

> @rel and @rev are not new attributes defined by RDFa, but have existed since
> HTML 2.0 was published 14 years ago. These keywords have been "grandfathered
> in" to RDFa and require slightly different handling to real CURIEs - for
> instance, they should be handled case-insensitively, as previous versions of
> HTML and XHTML have defined @rel and @rev as case-insensitive.

Oh, I see, I was not aware of that case-insensitivity.  (Is that really the
case?  I don't see any remark on that in the RDFa syntax spec.)  But still,
why that fuss?  The _element_ names in XHTML are not case sensitive either.

> It does seem a little redundant, yes, but there doesn't seem to be a
> better vocabulary to point the empty prefix at.

Indeed, I agree.  Particularly not in XHTML, where the usual _XML_ default
namespace is the one of XHTML, which doesn't make sense to use in RDF
expressions.

But, apropos, that makes me remember XSLT and XPath.  In XSLT 2, one can
specify a default namespace to be used inside XPath expressions, and that
default namespace is independent from the XML default namespace.  This is done
by the @xpath-default-namespace attribute that can occur on any XSLT element
(see http://www.w3.org/TR/xslt20/#standard-attributes).  Analogous to this
would be introducing an additional RDFa attribute @curie-default-namespace;
how about that?

Cheers,

Christoph

-- 
Christoph Lange, Jacobs Univ. Bremen, http://kwarc.info/clange, Skype duke4701

Received on Thursday, 26 November 2009 15:25:35 UTC