Re: Selection Filtering

I've been thinking about how to bite, assuming I'm thinking about the same problem. I've been considering how to specify that a particular annotation is about a resource when that resource is considered in the context of another resource.

This can be done with an additional selector-like property: oax:hasContext. This could have the same target as oa:hasTarget, so anything that can be a target can be a context.

For example, if I wanted to annotate an image as it is embedded in an html document, I could have the following triples:

Anno1 a oa:Annotation ;
  oa:hasTarget Spec1 .
Spec1 a oa:SpecificResource ;
  oa:hasSource IMG ;
  oax:hasContext Sel1 .
Sel1 a oa:SpecificResource ;
  oa:hasSource HTML .

I'm not sure how to interpret the oa:hasSelector {FileSel1,ImgSel1,Svg1} pieces of the second example to know how to transform them into a similar form as above.

I like this form because I can ignore the oax:hasContext piece and still have a good chance at getting the annotation in the right place. For example, if I am annotating a video embedded on a particular page, all I have to add is the oax:hasContext piece to state that it is in the context of that resource, instead of annotating that resource and hoping I can select the video within that resource (and hope that such a selection doesn't have to change due to edits in the embedding document).

-- Jim


On Aug 9, 2012, at 4:56 PM, Robert Sanderson <azaroth42@gmail.com> wrote:

> No one seems to be biting, so I'll throw out a proposal for a solution
> (maybe)  :)
> 
> Instead of considering the annotation to be on the lowest level object
> and then climbing back up the hierarchy (annotate the image, in the
> html) instead we can use the regular structure of annotating the
> highest level resource and drilling down with Selectors to the most
> appropriate part (annotate the html, select the image).
> 
> This would work in all of the cases described, and often with just
> FragmentSelector.
> eg:
> 
> Anno1 a oa:Annotation ;
>    oa:hasTarget Spec1 .
> Spec1 a oa:SpecificResource ;
>    oa:hasSource HTML ;
>    oa:hasSelector Sel1 .
> Sel1 a oa:FragmentSelector ;     // oax:XpointerFragmentSelector ?
>    rdf:value "xpointer(/xpath/to/img[@href="Img1"])" .
> 
> Anno2 a oa:Annotation ;
>    oa:hasTarget Spec2 .
> Spec2 a oa:SpecificResource ;
>    oa:hasSource ePub1 ;
>    oa:hasSelector CompSel1 .
> CompSel1 a oa:CompositeSelector ;
>    oa:hasSelector FileSel1 ;    //  select xhtml file in zip
>    oa:hasSelector ImgSel1 ;    //  select image in xhtml
>    oa:hasSelector Svg1 .         //  select SVG area of image
> (...)
> 
> 
> The main issue is that the URI of the component resource (eg the
> image) is not easily accessible, if it has one.  In the ePub case, it
> doesn't have its own HTTP URI, but in the regular web page it does.
> 
> Thoughts?
> 
> Rob
> 
> 
> On Wed, Aug 1, 2012 at 4:09 PM, Robert Sanderson <azaroth42@gmail.com> wrote:
>> Starting a new thread on this topic for ease of tracking :)
>> 
>> In other a couple of other threads, the desire to describe an
>> annotation which targets a resource in some particular context was
>> expressed.
>> For example, to annotate an image only as it appears in a particular html page.
>> 
>> The base requirement seems to me to be:
>>    Annotate [part of] (resource) as it is used in (resource)
>> 
>> This extends quickly to:
>>    Annotate [part of] (resource) as it is used in [part of] (resource)
>> For example, annotate an image as it is used on page 4 of a PDF.
>> 
>> This could mean arbitrary nesting, to allow for annotating an image in
>> an html file in an ePub document.
>> The same should be applicable for bodies as well as targets, in order
>> to extract contents from container resources.
>> 
>> Is there a requirement for differentiating between the resource, and
>> the resource used in some container resource?
>> For example, is it important to be able to annotate an image, but not
>> have the annotation appear when that image is embedded within an HTML
>> page?
>> For annotating non-rendering resources (such as CSS, Javascript etc)
>> it might be important?
>> 
>> Is there a requirement for sets of container resources, or is it
>> sufficient to simply create new annotations? For example, this image
>> in these 3 HTML pages.
>> 
>> 
>> A second application of filtering, that makes me very nervous, is:
>>    Annotate all occurrences of (selection) in (set of resources)
>> 
>> For example all occurrences of the word "annotate" in any textual
>> resource, all occurrences of the top left pixel in JPEG images, all
>> occurrences of the first line of text in all copies of Shakespeare's
>> "Hamlet".
>> 
>> 
>> Before we start thinking about approaches and solutions, it would be
>> great to firmly scope what it is that we're trying to solve :)
>> 
>> Thanks,
>> 
>> Rob
> 

Received on Thursday, 9 August 2012 21:30:13 UTC