[![W3C][1]][2] # Web Annotation Working Group F2F San Francisco ## 22 Apr 2015 See also: [IRC log][3] ## Attendees Present Frederick_Hirsch, Rob_Sanderson, Tim_Cole, Ray_Denenberg, Randall_Leeds, Nick_Stenning, Paolo_Ciccarese, Gergely_Ujvari, Kristof_Csillag, Takeshi_Kanai, Jon_Udell, Phil_Desenne_(Harvard_Observer), TB_Dinesh, Benjamin_Young, Jake_Hartnell Regrets Chair Frederick_Hirsch, Rob_Sanderson Scribe tilgovi, TimCole, tbdinesh, fjh, bigbluehat, jakehart ## Contents * [Topics][4] 1. [Welcome, Agenda Review, Announcements][5] 2. [LDP recap][6] 3. [Client API][7] 4. [Minutes Approval][8] 5. [Agenda review and update][9] 6. [Protocols][10] 7. [Publishing][11] 8. [RangeFinder API][12] 9. [Search][13] 10. [Meetings][14] 11. [Data Model][15] 12. [Other Business][16] 13. [Adjourn][17] * [Summary of Action Items][18] * * * Date: 22 April 2015 Agenda: [https://lists.w3.org/Archives/Public/public- annotation/2015Apr/0118.html][19] TimCole: [http://w3c.github.io/web-annotation/protocol/wd/][20] 1. Introduction, Scribe Selection, Announcements, etc Annotations at Europeana 2. Minutes approval 3. Client API Frederick to start, followed by implementation lessons and ideas (e.g. Hypothes.is Nick et al), discussion break 4. LDP Recap 5. Protocol - update, next steps, FPWD? lunch 6 robust anchoring, find break 7 search 8 additional use case discussion - footnotes, web packaging, publishing etc 9 Data model issue review 10 other business ScribeNick: tilgovi ### Welcome, Agenda Review, Announcements am Randall scribe then Tim Dan Whaley: with Hypothesis Kristof Csillag: with Hypothesis Gergely Ujvari: with Hypothesis Takeshi Kanai: I'm Takeshi Kanai, with Sony Rob Sanderson, Stanford, co-chair with Frederick, co-editor with Paolo on the model, editor for protocol (and happy to have a co-editor :) ) I am interested in implementing the outcomes for this device (holding tablet device) We are trying to also read Web documents on this device Randall Leeds: I'm Randall Leeds, also with Hypothesis Jon Udell: I'm Jon Udell, also with Hypothesis Ray Denenberg, Library of Congress .present +TB_Dinesh Tim Cole (TimCole), University of Illinois and a founding member of the Open Annotation Community Group Phil_Desenne: I'm Phil Desenne with Harvard University bigbluehat: I'm Benjamin Young, I'm with Hypothesis. I like APIs. Annotations at Europeana [https://lists.w3.org/Archives/Public/public- annotation/2015Apr/0103.html][21] TimCole: There are a number of different people working on different pieces. There has been annotation in Europeana previously, but there seems to be a scribe: tilgovi There seems to be a new push to bring annotation into the core of Europeana, which is good; glad they're paying attention. fjh: Ivan is not here, but there's this whole space of ebook related stuff that maybe we should address and other things that we need to revisit that we haven't done Does anyone else have anything to offer the agenda? TB asked how this comes together with other things like social but I think we have a pretty full agenda bigbluehat: I wanted to know who was here yesterday. The social web is looking at SOLiD, a social web linked data thing. I wanted to know if it came up at all. ... the social WG is looking at several different protocols, but SOLiD seems to have a lot of iteration and the most overlap with us because it's LDP fjh: We're going to move on now, to the LDP recap ### LDP recap azaroth: yesterday there was a meeting of the LDP WG, about the same number as here today ... including Arnaud Le Hors from IBM and bar from Oracle, as well as myself and Dinesh and Takeshi ... main work was finding out the status of what everybody is doing Patch azaroth: relevant bits for us, the LD PATCH work is ... to send updates to a resource rather than completely overwriting it, like SPARQL update and JSON PATCH and diffs SoLiD API proposal (based on LDP) from the Social Web WG: [https://github.com/linkeddata/SoLiD][22] azaroth: but for linked data, where we might have blank nodes, and other things ... that has all the boxes checked to go through to technical recommendation ... However, the third part, LDP Paging, does not ... At the moment, there's only one implementation, and the framework for a test suite ... but needs a second implementation and test implementation to demonstrate interop ... The status at the moment is that it would be published as a WG note, rather than a TR ... If we want to make normative references to that, if we as a WG think that's the right way to go for paging through sets of annotations, that would help us a lot in the future because then it could be a TR that we could refer to ... The other thing addressed was the rechartering process. We tried to gauge interest in the different topics that had come up for a second round of work. ... The topics that were most interesting were discovery (of containers, endpoints), which we need here, and extensiblility, so if there were a new capability that a server implemented there might be a way to link to that documentation of what it can do ... There was a lot of discussion about filtering and query, which we've been discussing here as well, and it's promising that that is ranked highly ... The third area was access control ... Seems like all of the LDP 1.1 focus would help us in the Annotation WG ... Unnerving issue is that the current chair cannot commit to being a chair in the future WG, so we would need to find a new chair before we could continue fjh, you wanted to ask about benefit of referencing LDP, interop benefits, risks fjh: I've been asking myself "what is the benefit/risk of having a dependency on LDP?" ... if what we're deploying is mostly just some REST then what do we get ... my understanding is that some of what's in LDP we don't need ... my suspicion is that if paging is a note there will be no interop testing ... so we have to make interop testing for that azaroth: For the basic containers there is a test suite and we would be able to bridge a lot of tests and implementations ... I think it's worthwhile. Especially on the last call, we discussed that paging may simply fall out naturally from querying or relate more strongly to paging than the general LDP paging ... other advantage is that we wouldn't need to specify all of the base level interactions like what is PUT, POST, etc ... Really just a profile of that where what you're seeing is an annotation fjh: if it hadn't been done, I would be concerned about creating a dependency if we were going to do it anyway shepazu: because this isn't my area (that part of the stack) I'm not really comfortable knowing if LDP and ActivityStreams... where they overlap, compete, etc ... I know there were people who attended the annotation workshop from the US gov't who said 'we have to do ActivityStreams' ... is ActivityStreams in the same space as LDP or not? fjh: There were three ways social was looking at doing protocol, LDP, ActivityStreams, and Micropub, so the LDP stuff would be a profile like what we're doing ... I'm not familiar with SOLiD bigbluehat: SOLiD spun out of the last Social WG F2F, possibly mixing in some SPARQL stuff fjh: I thought micropub was the one that had legs in the group bigbluehat: the group is pretty fractured, but micropub has an Achilles heel because it has no JSON-LD semantics ... so you would have to map it to an ActivityStreams output ... whereas the LDP-based one is JSON-LD, is AS2.0 ... James Snell has an implementation, and then there's SOLiD which pulls in other things ... James' stuff is just LDP + AS2.0, but both use AS2.0 as currently written ... the other two have no knowledge of AS2.0, so there's a whole lot more work to do to map it to the document that's been made so far fjh: what is the time frame fro SOLiD? bigbluehat: they are having a F2F in May in Paris. ... that was stuck on the board as a deadline for a fleshed out presentation ... they're getting decent iteration of it ### Client API fjh: we have a bunch of stuff in our charter, some stuff we haven't talked about much ... so one of the ideas for this F2F is to get those things moving ... one of the topics is the client side API, we should talk about what we're trying to do and what the assumptions are ... I think we're talking about JavaScript using Web IDL ... I think we're talking about JavaScript using Web IDL ... The reality is that it just goes to JS now, but we still use it all over the W3C anyway ... but that's what I think script interface means... JS described by Web IDL ... events means HTML5 Events ... "in a browser" means we're talking about asynchronous interfaces that probably use Promises ... reading system is another item in the list ... I think that means we want support for offline and synchronization, but we should talk about how far we have to go in that work ... I'm not sure what a plugin means except that it's an incremental deployment strategy ... to do the implementations without getting browser buy-in immediately ... So what's the core functionality of the API? ... I think it includes some basics that are similar to the protocol but it's not the protocol ... I don't think Social WG has a client protocol in the same way, so when they say Client API they mean the protocol ... We want to allow to do things in a client application, something different from but integrated with the protocol ... I think you're working with the JS in the page you're at, which has security implications ... Doug has work on a robust anchoring API, we'd probably want to integrate with that ... Local caching seems important, whether it's in the API, I don't know ... The authentication, OAuth, seems important, I don't know if it's ours but maybe we have to make recommendations ... then search, which is probably an API method as well ... We have to do sensible HTML5 integration, which means a bunch of best practices for writing APIs on the earlier API note, here's James Snell's LDP-based ActivityStreams API code: [https://github.com/jasnell/dandus][23] fjh: you should be able to have a server-side implementation and still do stuff, a client API is not required in that sense ... I was thinking about the IndieWeb work and noting the requirements there about server software simplicity, but I think this doesn't impact the client API ... There's a lot of stuff going in with privacy in different W3 groups, and one thing that has emerged over the years is the idea of user control ... sharing with the server expectations about retention and re-use of data ... we might want an extension point but I'm not sure we need to do much ... Do we need to say anything about UI implementation support in the API? ... Do there need to be methods to help associate CSS stuff with the presentation? ... Do we need to integrate with social? I think it's beyond what we need to worry about at the beginning. ... There's a list of requirements in a document from paoloC that might also apply to the API ... What's the target URI, path, we have to be able to make these statements in the API ... I'm hoping this will dovetail a bit with what nickstenn has been thinking about [https://lists.w3.org/Archives/Public/public- annotation/2015Apr/att-0121/ClientSideAPI.pdf][24] Link to the requirements from DPUB use cases: [http://www.w3.org/TR /dpub-annotation-uc/#requirements][25] nickstenn: to be clear, I don't have a slide show that answers any of the questions that fjh just asked ... this is not a piece of work with hours of investment, but it's a thing we've been playing with on and off at Hypothesis ... it's one piece of what we're talking about [https://docs.google.com/presentation/d/1ZKSZyLbEFqwYaG32cFJwcXQjj iU2ZzQguDmyhKfaTdY/edit#slide=id.p][26] nickstenn: What I'm going to talk about is a little project that came out of questions around how we make Annotator part of an interoperable ecosystem and part of the work doing here rather than doing its own thing ... this component is supposed to answer, "What is the smallest, useful, low- level component in a client-side API for annotation?" ... I'm talking about something that might be useful across different applications but is not expansive in scope ... when we say "client side" API we envision something that would ultimately be used in JS from the DOM APIs ... by "low-level" we mean that standardized APIs in clients should be lower- level than you might at first think, because it's less likely that you'll build something wrong even if other people have to do more work to make it more useful +1 to nickstenn nickstenn: but if you give something higher level where there isn't access to the nuts and bolts it may end up not getting used ... What I mean by 'annotation application' I mean some piece of software that creates annotations, whether the user sees it that way or not ... for example, it could be the code that Medium uses to create annotations ... it could be an extension that lets you see who is tweeting about the current document ... the point is that the state of the annotation applications lives with them (in this diagram) ... DOM Annotations is supposed to be a layer over the document where the current state of annotations on the document can live ... the idea being that the application(s) can use that and potentially see the annotations created by other annotation applications ... When I say "state", I am specifically talking about the state of annotations attached to a document at a current point in time in a given "page load" ... Not storage, not retrieval, not persistence ... This is like when you open the inspector and see the styles and DOM elements ... as a developer, you might ask, "How do I attach annotations to (parts of) the document?", "How do I retrieve annotations associated with (same)?" ... and, to riff on what fjh said, most HTML APIs are event based ... so, "How can I be notified when annotations are attached/changed/removed" even by pieces of software I don't control ... DOM Annotations tries to answer some of these questions [https://github.com/nickstenning/domannotations][27] nickstenn: "straw man" proposal, pick holes in it: [https://github.com/nickstenning/domannotations][27] ... This is all it is, it's not large ... currently implemented as a polyfill, in the sense that you load a library and it attaches stuff to existing pieces of the DOM API ... it is intended to mimic existing APIs ... one of my questions is: "is that a good idea" ... some argument from consistency says "yes" but whether that's the best practices at this point is not clear ... Three functions on the document object (we can argue about whether that's the right thing): ... createAnnotation(), no arguments ... as document.createElement() creates an element but doesn't attach it to the document, this is essentially just a constructor ... getAnnotations(), at the moment takes an array of Nodes, is the querying part ... it asks what annotations are attached to the nodes ... lastly, removeAnnotation() is probably fairly obvious ... In the current implementation, Annotations are first class objects just as Nodes and Elements are ... At the moment, they don't do anything interesting, just enough to work ... they have two methods, addTarget() and addBody() ... Targets are also, currently, first-class objects you must, yourself, construct that reference parts of the DOM ... If you are familiar with the Range APIs... ... a "Text" target might be a wrapper around a Range [https://dom.spec.whatwg.org/#ranges][28] nickstenn: There are also some events: 'annotation{create,change,remove}' ... these are fired on the Document ... 'annotationcreate', it's worth noting, at that point nothing is attached and there is no data for the annotation ... 'annotationchange' says it changed, someone added a target / removed a target, etc shepazu: At that point, would the event bubble or would it simply be on the Document? nickstenn: At the moment it's simply on the Document ... the first time I did this I made it bubble, but there are problems we can discuss with that ... 'annotationremove' is probably straightforward fjh: I assume this means that I could have an event handler, and then update the server if I want persistent storage ... so the event model is elegant in allowing you to do these things as you see fit nickstenn: precisely TimCole: so if I remove it, I'm removing it from "this document" and it says nothing about what's happening on a server nickstenn: Yes. There is a distinction between change and remove vs update and delete. ... change and remove happen within the document, but update and delete are user actions with effects elsewhere ... it may well be that removal denotes that you want to delete it, but it may not shepazu: conversely, if someone made an annotation, remotely, and they delete it, it wouldn't be removed in your local document azaroth: as well as the persistence layer, you would need this for the user interface layer nickstenn: some of these discussions we might want to have more informally ... "how would you write a persistence module that watches these events and saves annotations elsewhere" ... "how would a user interface module that wants to draw highlights on the page and remove them" fjh: I like that it's simple and it's consistent with what I've seen about events ... is Server Sent Events a rec? nickstenn: Again, that is something you as an implementer might integrate with this API to handle events from a server ... Server Sent Events specification: [http://www.w3.org/TR/eventsource/][29] EventSource is the browser-side API name for dealing with Server Sent Events nickstenn: When I select text, I use the same methods to detect the selection that I do in Annotator ... but then I create an annotation (using the createAnnotation API) ... The highlighter, though, is a separate component, that listens to the annotationchange event and enumerates the targets and draws some highlights ... At the moment, this is a polyfill, so it's kind of a hack on a stick, so they are DOM CustomEvents ... this would be something we actually specify in WebIDL ... when I click on a node, I'm using the getAnnotations API to get the annotations on that node ... and then using the removeAnnotation to remove the annotations ... the highlighter then listens to the annotationremove event, and removes the highlight text/event-stream is the Media Type for the text format sent from the server: [http://www.w3.org/TR/eventsource/#text-event-stream][30] shepazu: With the getAnnotations, let's say there are two annotations that are on a particular span ... what if I wanted to get all the annotations on a particular section? ... the node that I'm clicking on has annotations with it as its target ... does it also work for getting all annotations within a node nickstenn: what you have described is "given a node, show me the annotations" but a lot of real world applications might want "given a chunk of the document, give me all the annotations" ... I think the answer to that is that it's low level, and getAnnotations takes a list of DOM nodes ... you can use existing DOM APIs to enumerate the nodes in a paragraph and then pass that ... If anyone wants to know what's going on under the hood, I can walk them through the code ... It's worth stressing this is a low-level API it is not meant to be pretty ... there are lots of edge cases you need to address if you're writing an application that uses this ... but the advantage is you can serve all scenarios, even if it is more work ... This is not intended to help with storage, persistence, or retrieval. ... it is not intended to help with fuzzy anchoring, or taking a serialized annotation and finding a bit of the document. ... and it is not necessarily intended to help with serialization ... that is one of the more interesting questions, I think, trying to understanding how the serialization would work ... is there a way we could do it completely orthogonally to this piece ... This is merely a reflection of the "annotation state" ... Open questions for the group ... does this "smell" right? should it be imitating other APIs with, for instance, createAnnotation API ... Events vs Mutation Observers? ... This deals with "reified state", references to bits of a live DOM thing... is this the right thing for it to be doing? ... How does serialization work? ... Lastly, this is not a bulk API. Does it need a bulk component? How would we find that out? What performance testing would we need to do to find out? shepazu: First, thank you for putting this together. orthogonality is good shepazu: I think it's orthogonal to something other things like the RangeFinder, I like how you went low-level ... another reason to do that is because you can compose it up into other things modularity, testability etc are useful shepazu: that's very much the trend the right now ... things like the CSS Houdini project is trying to give CSS more explicit, lower-level components, so I think your instinct is right ... I think it does smell okay ... in your model, is the event only sent when someone does something via script? or does it also change when the underlying DOM changes? ... If I have a target and that target goes away... that's when you start getting into mutation ... This thing is a meta-thing on top of the document, so it doesn't change the document itself, so you wouldn't get into loops ... but for utility sake, if the target of an annotation changes I might want an event, but then it might get us into mutation observers nickstenn: I don't have a whole answer, but at the moment the events are triggered by user (script) actions on the annotation only ... for the benefit of people who have not run into this before, let's say you do have a long document and things are popping into and out of existence as you scroll, that's a real example of where you might attach an annotation to a document and then the piece of document where that is attached just disappears ... that at the moment does not cause any problems, because the annotations are attached to the DOM elements ... and if the elements are released the annotations go away ... If you have a reference to the node, you can get the annotations, otherwise you can't use the API to get to the annotations shepazu: what if I create a node, create an annotation, and then attach the paragraph to the annotation as a target, and then insert that into the document ... does the node have to be in the document fjh: A big thank you for all this work, it helps move stuff forward. ... my instinct is you're doing the right thing ... you want to keep it simple and we can do separate specs to build on it ... we want it to be testable, modular, usable, so I think it's the right approach ... I would suggest when we have a draft spec we can run it by the TAG and get feedback, so I think we can ask the right people and get feedback in no time fjh, you wanted to ask about server integration fjh: Just because we do one thing that's simple doesn't mean we can't do other things on top TimCole: Right now you have the annotation, addTarget and addBody, right now those are the only two methods ... the fact that the target can encompass multiple nodes is interesting ... the next question is, what's the functionality for multiple targets or for removing a node within a target, are any of those things there yet or are they priorities? nickstenn: A couple questions in there I recommend we start simple nickstenn: other properties, absolutely. If we're going to have an Annotation class it needs to actually support the pieces of the model ... multiple targets, this does multiple targets ... you can do addTarget multiple times ... If I remember correctly, addTarget gives back the Target object and then you can remove that object ... and what happens if the piece targeted changes, I don't think that matters until serialization time ... and that is why DOM Annotations doesn't, in the general operation, need to worry about that paoloC: I have a few points. My first impression was "this is really neat". ... my second reaction is that I'm worried about the complexity of the model and that possible the body and the target are open ended ... I'm sure we can extend to accommodate this ... how do you feel about complex highlighting, overlapping, nested, all these complications ... is that all still orthogonal? nickstenn: I think that is a completely separate issue ... DOM Annotations lets you attach as many annotations as you like to the same piece of the document paoloC: But if you have not nested annotations you have to break them down in the document nickstenn: I think you have to be careful not to consider it the same as creating highlights in the document ... this is a separate problem paoloC: then I was worried about the dynamicity of the documents. ... I agree that the part that could be hard is the storage nickstenn: My personal mental model of how we're going to do this stuff is that we may have to think about storage as being a bit more of an op log approach than a CRUD approach ... someone is creating annotations in a changing document, the storage component might simply be watching that and then by some heuristic might decide at some point that we're at a place where we can save that off to a remote server ... if you like, you create the annotation once and that's the right annotation and then it's the responsibility of the persistence component to know that the annotation might need to be updated when the annotation does change paoloC: I'm worried about actions and the difference between document pieces loading and document pieces getting deleted ... I think if we had to use this in a framework I would have to duplicate some functions in the code ... talking in particular about ReactJS tbdinesh: The way I see an annotation happen is that there are first selectable objects ... if you can't select you don't have targets ... could be text but there are lots of other things ... so what is it that makes something annotateable? ... is how we select something ... I'm not sure this is the smallest nickstenn: I think you're right, if you can't select a piece of a document you can't annotate it ... to address the issue directly, I think that's true, but there is an extent to which that is not the problem of this component ... how does the user interface work? not the problem of this component. ... what this component needs is a Target object, which is some domain object that provides a reference, if you like, to the thing you have selected ... possibly also a way of serializing that ... and what this deals with is Targets that are themselves Nodes in an HTML document tbdinesh: would it be simpler if you didn't do selection across the DOM elements nickstenn: so you're saying that the ability to create a target that spans multiple elements in the document means this isn't the simplest thing ... I think that's interesting how does fit with create body first then add targets model? nickstenn: my gut tells me when a user annotates an HTML document they're not thinking about elements and the DOM tree ... they're thinking about a "logical document" ... if I'm using MS Frontpage it might span 500 elements for no apparent reason ... that's why a target can refer to a range, which can span multiple nodes shepazu: Target is not yet defined, as far as I can tell. It might be a Range or it might be a section of a 3D document. ... I can't pass an event on the 15th second of a video, but we can target that tbdinesh: I think we need to think a little bit lower nickstenn: I think we're all saying the same thing tbdinesh: this is to do with elements that are not part of the document ... one thing we do is to make annotations that are navigable for a page that is not accessible ... (talking about accessibility) ... You change the page through your annotation, and that is the page your annotations work on nickstenn: I think what you're describing is annotations of things that don't exist exactly in the document tbdinesh: To clarify, there's a DOM Element and it's not identified as part of the navigation bigbluehat: I think there are more pieces that aren't presented here, and this is the DOM surface area, which comes and goes with the DOM state machine ... there's got to be other pieces ... there's a growing contingent that want to get rid of the DOM state machine, and want a different sort of expression ... but for the thing that we have, I think this works well nickstenn: the thing to do is for us to identify the use case we're describing, make sure that the use case is recorded, so we can ask "is the thing that we've built going to cover the use case" fjh: "Are we clear on what the goal is" Scribe: TimCole nickstenn: from an accessibility perspective you may wish to annotate parts that are not in the document Much thanks to Randall for excellent scribing shepazu: let's i have an image in my document, but no alt tag. now i want to attach a description for accessibility (lost connection, rejoining) shepazu: this is an annotation. you would create an annotation attach to image and add a body which is the description tb: I annotate to change the DOM in order to support accessibility bigbluehat: use case coverages -- paolo and i do use cases, mostly protocol to date. need help on client-side use cases ... what doesn't DOMAnnotations handle, i.e., non DOM State Machine annotations the use case to capture from above was "Annotate elements that aren't in the document in order to indicate that they *should* be. As a blind person, I want to let the page author know that a