Re: [web-annotation] Fragment Specification for RDFa

@csarven,

first of all, thanks for having closed the issue; I think that _for 
this group_, _now_, this is the only choice we have.

That being said, let me comment on the original technical issue _is_ a
 real issue (just not for this group to solve).

For those who do not know the details of RDFa, the problem is, I 
believe, that there are different ways of defining, in RDFa, URI-s 
_with fragments_ that only appear in the generated RDF. Eg, taking an 
example from the [RDFa 
Primer](http://www.w3.org/TR/rdfa-primer/#internalReferences), the 
`@resource="#me"` within the file `http://www.ex.org/e.html` is valid,
 and yields the URI `<http://www.ex.org/e.html#me>`, although there is
 _no_ `@id=me` setting in the HTML file itself. The fragmented URI 
appears in the generated RDF only. The current fragment selector is 
therefore of no help to select it; what would be needed is a selector 
that refers to the _generated RDF_ rather then the HTML file itself. 
And the problem is that there is no standard way to do that.

In fact, the issue is more complex. Indeed, _there is no proper 
definition for a fragment identifier for RDF_. RFC3870 is defined for 
RDF/XML and _not_ for the abstract RDF graph. In particular, formally,
 it is _not_ usable as a fragment identifier for, e.g., a Turtle 
serialization of the graph, let alone the abstract RDF graph it 
serializes (and RDFa is defined in terms of the abstract graph!). Ie, 
even if the RFC3870 were used in a fragment selector for an HTML5+RDF,
 it is not really precise (although implementations may probably gloss
 over these niceties).

(The problem is, probably, with the very notion of a fragment 
identifier. Formally, it is defined for a specific media type, and 
that does not fit the abstract RDF graph view...)

All that being said, I see some possibilities for an implementation to
 approach this in practice, although **none of these are ideal**:

1. Useing a CssSelector it is possible to access to the elements that 
use, e.g., `@resource`. Ie, it is possible to locate the elements that
 set those URI-s. _For the purpose of an annotation_ that may very 
well be enough.
2. Use some RDFa distiller to create a URI for the generated RDF file 
(e.g., 
`http://www.w3.org/2012/pyRdfa/extract?uri=http://www.ex.org/e.html`),
 and then use the RFC3870, with the caveat described above.
3. Define a new, currently implementation specific Selector type 
(either a top level Selector or a subclass of the fragment selector) 
that, in its specification, makes it very clear _what_ is really 
selected. Although the usage of a fragment may not be 100% correct in 
terms of the formal specification of a fragment id, this may still 
work.

The third option is probably the cleanest approach. If the RDF or RDFa
 community provides such a proper selector specification, I can 
imagine adding this to a _future version_ of the specification, 
although it may not be necessary to do so: it should be perfectly o.k.
 to specify a new selector as an extension without adding it to the 
core spec.

(I am happy reopening the issue as a 'postponed' issue added to the V2
 milestone if others think that this makes sense.)


-- 
GitHub Notification of comment by iherman
Please view or discuss this issue at 
https://github.com/w3c/web-annotation/issues/295#issuecomment-225141508
 using your GitHub account

Received on Friday, 10 June 2016 09:51:02 UTC