Re: @rel syntax in RDFa (relevant to ISSUE-60 discussion), was: Using XMLNS in link/@rel

Mark Nottingham wrote:
> Are people using RDFa in HTML using the profile mechanism, or xmlns, or
> both? Do they flag the use of RDFa in any way (like @version does for
> XHTML+RDFa)?

We recommend using the doctype with @version. We've determined that,
while @profile is the right approach for interpreting new values of
@rel, it doesn't cover new attributes, so it's not the right way to flag
RDFa.

That said, as Sam brought up, we know that we live in a world of web
widgets, and so we expected that RDFa might well get deployed without a
flag... which is why we structured RDFa to be as backwards-compatible as
possible. New attributes, clear separation of syntax for prefixed values
of @rel, etc... Not perfect, but the best we could come up with to stay
sane in a world where HTML fragments are flying around.

And of course, there's *one* RDFa syntax, independent of the
vocabularies used. I mention this to contrast with microformats, which,
while very useful, introduce new values of @rel and globally meaningful
values of @class typically without ever using any kind of flag. And no
one seems to be worried about that, even though it's vocabulary-specific
and the syntax changes from one vocab to the next :)

> The draft already accommodates different syntax for different
> serialisations; the section you're referring to is not syntax-specific.
> If you (or anyone) has suggestions about how to make that more clear,
> I'm all ears, but I believe it's already stated quite clearly.

I see that now, yes, section 4.2 probably doesn't need to be modified.

> What I can see doing is adding information in the appendices (alongside
> that for HTML4 and Atom) about relations in XHTML (after their syntax is
> clarified, see other parts of this thread) and XHTML+RDFa; that seems
> pretty straightforward.

In Appendix A (HTML4), you say:

=======
For example, in HTML:


   <html>
     <head profile="http://example.com/profile1/">
       <link rel="foo" href="/bar">
     </head>
     [...]


could be represented as a header like this;

   Link: </bar>; rel="http://example.com/profile1/foo"
========

This might be read to imply that @profile can only be used to prefix a
@rel value. I don't think that's right, given the HTML4 definition [1]
which, I believe, allows a profile to do just about anything to
interpret a @rel value.

> if we could come to one way of doing this per syntax, and ideally one
> way of doing this across the HTML family of languages (although that may
> be asking too much).

I would like that, too. We're listening to the feedback from the HTML5
WG to see if we can find a common mechanism for RDFa in all versions of
HTML which include RDFa.

> As it sits, a generic parser can't reliably identify the link relations
> in an HTML4 document just by looking at it; if I understand what's being
> done here, the relation "ab:foo" might mean radically different things
> in two different documents, even if they have the same profile
> attribute, thanks to the use of xmlns. This is bad.

The relation is the fully expanded URI, so I'm guessing you mean the
string value of the @rel attribute before it gets processed.

This situation is, I believe, already the case in HTML4 given that
@profile affects the interpretation of the @rel value. Unless I'm
missing something, I don't see how XHTML1.1+RDFa is much different here.
More or less, RDFa's prefix-based processing of @rel is a default
profile for XHTML1.1+RDFa.

> 1) Can CC require (or at least recommend) the use of @profile, and
> mandate that the cc: prefix always be used? This would help disambiguate
> these relations in a way that's more compatible with generic parsing.

As I mentioned above, we don't believe @profile is the right way to go
because RDFa also includes new attributes. We do recommend that folks
write valid HTML, and to write valid RDFa, you have to use the
XHTML1.1+RDFa doctype and HTML @version. That is enough, I believe, to
trigger the appropriate interpretation of @rel values.

I'm conflicted about recommending the consistent use of the cc: prefix.
On the one hand, we basically already do this in all of our examples,
and of course I'd prefer to make life easier for you. On the other hand,
I don't want to give the impression that parsers should be lazy about
de-referencing the prefixes.

Do you see my point about how @profile already negates the goal of doing
raw string comparison on @rel values?

> 2) The Link draft can add a note that XHTML+RDFa-style syntax might
> appear in HTML4; implementations can either consider them locally-scoped
> extension relations (i.e., not meaningful in a global scope), or try to
> parse them if they like.

I think that would be helpful, yes.

> 3) If relations are going to be used more frequently in HTML4, some
> guidelines of best practice would be really helpful. The Link draft
> suggests a way to get from @profile + @rel in the HTML4 appendix; review
> of that would be appreciated, as I'm beginning to suspect it may need
> revisiting.

That's what I was commenting on above: I'm not sure you can assume that
@rel is simply appended to @profile. But maybe I'm misreading?

-Ben

[1] http://www.w3.org/TR/REC-html40/struct/global.html#h-7.4.4.3

Received on Saturday, 28 February 2009 23:33:50 UTC