Re: RDFa Lite and non-RDFa @rel values

On Mon, Apr 23, 2012 at 7:49 PM, Stéphane Corlosquet
<scorlosquet@gmail.com> wrote:
> (by RDFa Lite, I really mean the new behavior of the property attribute)
>
> It is common for web developers to add a rel attribute in 'a' elements, e.g.
> rel="nofollow" or rel="author". According to the current processing steps of
> RDFa 1.1, if this kind of @rel is used in an element containing a property
> attribute (such as an RDFa Lite snippet), it can impact the processing and
> change the triples which are generated. I'd like to explore ways to avoid
> this in HTML+RDFa.
>
> First of all let's start with an example:
> <p vocab="http://schema.org/" typeof="Person">
>    My name is <a href="http://example.com/" property="homepage">Stéphane
> Corlosquet</a>.
> </p>
>
> which generates:
> <> a schema:Person;
>    schema:homepage <http://example.com/>.
>
> Add a @rel to the mix:
> <p vocab="http://schema.org/" typeof="Person">
>    My name is <a href="http://example.com/" property="homepage"
> rel="nofollow">Stéphane Corlosquet</a>.
> </p>
>
> and @property no longer targets the @href but the innerText instead:
> <> a schema:Person;
>    schema:homepage "Stephane Corlosquet";
>    schema:nofollow <http://example.com/>.
>
>
> Option #1: ignore @rel if it only includes HTML Link types as defined
> at http://www.w3.org/TR/html5-author/links.html#linkTypes
>
> Option #2: ignore @rel if it does not include any explicit CURIE. I think
> it's safe to assume that the intentional use of RDFa terms in @rel will be
> limited in comparison to the use of RDFa Lite and the new @property
> behavior. Therefore requiring CURIEs to be used in @rel would allow us to
> detect whether @rel is used in an RDFa context or not, and from there decide
> whether it should be ignored or not.
>
> In both options, it is important to emphasize the "ignore", as an empty @rel
> would still have the same effect of switching the behavior of @property to
> the old way.

BTW, the HTML5 specification contains similar text [1].  If you look
at section "4.12.4.14 Other link types", you'll see that it references
a micoformats document [2].  There it defines other "allowed" and "not
allowed" values.  It categorizes the IANA link relations [1] as for
non-HTML documents even though IANA's registry contains relations
listed in section 4.12.4.

This feels like a slippery slope.  The list of "to ignore" values may
change and it also contains useful like relations like "license",
"alternate", "bookmark", and "tag".

The problem here is from allowing @property to take on dual role that
depends on the presence of @rel or @rev and/or @src, @href, and
@resource attributes.   When the @rel and @rev are present on an
element with a link (i.e. @src, @href, or @resource), the @property is
a shorthand for wrapping the descendants with markup and having the
@property attribute there.

In the example, that is:

 <p vocab="http://schema.org/" typeof="Person">
    My name is <a href="http://example.com/" rel="nofollow"><span
property="homepage">Stéphane Corlosquet</span></a>.
 </p>

Clearly, that is very different.

In step 11 of section 7.5 Sequence, what is the purpose of disallowing
the same interpretation?  Why not just remove @rel and @rev from
"otherwise, if the @rel, @rev, and @content attributes are not
present, as a resource obtained from one of the following:" so that we
get the triples:

 <> a schema:Person;
    schema:homepage <http://example.com/>;
    schema:nofollow <http://example.com/>.

?

[1] http://www.w3.org/TR/html5/links.html#following-hyperlinks-0
[2] http://microformats.org/wiki/existing-rel-values#HTML5_link_type_extensions
[3] http://www.iana.org/assignments/link-relations/link-relations.xml



-- 
--Alex Milowski
"The excellence of grammar as a guide is proportional to the paucity of the
inflexions, i.e. to the degree of analysis effected by the language
considered."

Bertrand Russell in a footnote of Principles of Mathematics

Received on Tuesday, 24 April 2012 14:18:50 UTC