[okfn-dev] Some questions about Annotator

Rufus Pollock rufus.pollock at okfn.org
Thu Mar 3 17:59:55 UTC 2011

On 28 February 2011 14:32, Giovanni Ledda <ledda at netseven.it> wrote:
> Hi all!
> ..my name is Giovanni Ledda, I'm a web developer in a small company in Pisa,
> Italy.
> I'm very interested in your amazing JS plugin "Annotator" and I'd like to
> ask you some questions about it.
> I'm developing an open source library that should act like Annotator, giving
> the users the possibility to annotate some web pages in order to store the
> annotations in a Semantic triple-store.
> I'm looking for a smart and server side way to store the DOM's fragments.
> - Does Annotator provide this function (I read something about that but I
> couldn't try)?

No we just store a quote (which is text selected -- but without dom structure).

> - And, if yes, how does it do (does it create some Json temporary file)?..I
> mean..I think in your example web page (http://annotateit.org) the fragments
> are saved inline...but, is there a way to tell Annotator to store them
> permanently, on the server (I tried the example upon the Shakespeare
> text..but when I refreshed the page, the annotations disappeared)?

We have a backend store where we store all the annotations but we
don't store the 'dom' fragment just the annotation text and selected
text plus other stuff. The annotator store code is here:


> And..just a few questions again:
> - I found some "traces" of xpath in your code.. perhaps, have you utilized
> xpointers to save fragments?

No we just use xpath (no-one has ever implemented xpointer afaik).

> - Does your code save the whole DOM or just the higlighted fragments?

See above.

> - Is there a way to interface the "store" plugin with a (for example) php
> script, in order to save annotations in a sql DB (does the .rb file on the
> Shakespeare example provide this functionality)?

We already have an annotator store with a defined REST protocol. You
could implement your own 'store' in php or whatever (ours in python +
flask + couchdb).


> Thank you in advance to pay attention to my questions! :-)
> Yours faithfully
> Giovanni
> --
> Giovanni Ledda
> ----------------------
> Net7 Srl
> Via Marche, 10 - 56123 Pisa
> Capitale Sociale 10.000,00 €
> P.Iva e CF 01577590506
> CCIAA di Pisa n. 01577590506 del 26/04/2001
> _______________________________________________
> okfn-dev mailing list
> okfn-dev at lists.okfn.org
> http://lists.okfn.org/mailman/listinfo/okfn-dev

Co-Founder, Open Knowledge Foundation
Promoting Open Knowledge in a Digital Age
http://www.okfn.org/ - http://blog.okfn.org/

More information about the okfn-labs mailing list