I've been scaling up the Mozilla/Firefox Annozilla Extension for making phrase-level semantic annotations. This typically involves hundreds of annotated spans per document, preferably viewed with multi-color highlighting.
Latest Patches:
- Files:
-
[patch121306_annozilla-chrome-content.patch]
for
annozilla-0.7.0.a.2.xpi
- [patch121306_annozilla-services-components.patch] for annotations-0.4.0.a.1.xpi
- [patch121306_xpointerlib-components.patch] for xpointerlib-0.2.5.xpi
- [patch121306_annozilla-services-components.patch] for annotations-0.4.0.a.1.xpi
Cryptic notes:
Upcoming AnnoTools Teaser:
112006 Patches:
- Files:
-
[patch112006_annotations.css]
- [patch112006_annozilla-chrome-content.patch]
- [patch112006_annozilla-chrome-locale.patch]
- [patch112006_annozilla-services.patch]
- [patch112006_xpointerlib-components.patch]
- (toolbar update, maybe to follow)
- [patch112006_annozilla-chrome-content.patch]
Cryptic notes:
(patches relative to Annozilla 0.6.7 and xpointerlib 0.2.4, or so)
101906 Patches: Summary
[Jump to patches! patch101906]
I've completed the implementation of highlighting by insertion of CSS-distinguishable spans. Doing so seems to require that xpointers be resolved individually just before highlighting, so highlighting and icons are added before adding to sidebar in all of the various and sundry load/post cases (which was pretty tedious).
Resolving xpointers for so many annotations also raises speed issues, so I've also added an asynchronous load feature. As well as an efficiency improvement to the xpointerlib service and catching a few cases involving ignoring marked elements during xpointer creation and resolution. (And an extra creation case for element text content, eg selectNodeContents of a heading for an outline, till range-inside might be implemented.)
And while we're at it...
- Previously inserted icons and highlights are detected on [re-]load, perhaps allowing for some future file caching feature, or at least when the sidebar is closed and re-opened.
- Highlight spans aren't removed on close (yet), only on delete
- Don't remove icons on sbarUserLoadBegin (at least)
- - don't remove icons in other cases? (you can always reload the page)
- - problem with IconManager._removeIcon: removeChild doesn't dispose?
- (Want to load annotations on sbarOnLoad? - ought to be a preference?)
- (Insert highlights without icons?
- Maybe after a context routine for listing annotations at selection.)
- Don't remove icons on sbarUserLoadBegin (at least)
Delete annotation button from updating editor dialog.
- Sidebar entry popup function to scroll the document to the given annotation.
- And sidebar entries start out closed
- - there ought to be a preference.
- Additional (contextMenu) functions for adding an annotation, possibly non-modally, initialized with a given type name
- - allowing for one-click annotation with arbitrary annotation types.
- LocalServer annotations datasource refreshed before reload
- - there ought to be a preference.
- A supplemental Phoenix browser overlay (currently a separate development extension) adding a toolbar and context menu items:
- Non-modal posting of "Condition" and "Recommendation" annotations
- Load[/StopLoad] button
- - Sidebar? we don't need no stinking sidebar
- - But have IconManager keep a pointer so the button works on sbar reopen
Outline/table of contents out of annotations for a page from HTML headers- - A good use for the sidebar after all.
- - note: with the exception of asynchronous load _addNext, most calls
- to xptrResolveAnnotation (particularly in postAnnotationOnSuccess)
- use window._content.document, so pointers won't resolve if we go
- off looking at another document while outline annotations are posted,
- though we can always reload them
- Load[/StopLoad] button
- A few unresolved bugs to note:
- - problem with IconManager._removeIcon: removeChild doesn't dispose?
that means re-opening sbar, deleting annotations, eats memory
- - xpointer memory leak on resolve failure (throw) eg. if element text content (newly addressible case) is shortened in revised document
The above are available as 4 patch files, 1 new (css) file, 1 new zip file:
All of the above require the following three patches and new css file:
- [annozilla-chrome-content.patch]
- annozilla/src/chrome/content/annozilla->extensions/{annozilla}/chrome/content
- [annozilla-chrome-locale.patch]
- annozilla/src/locale->extensions/{annozilla}/chrome/locale
- [xpointerlib-components.patch]
- xpointerlib/src/components->extensions/{xpointer-service}/components
- [annotations.css] - css for highlighted spans
- annozilla/src/chrome/content/->extensions/{annozilla}/chrome/content
- And optionally:
- LocalServer Reload in lieu of preference:
-
[annozilla-services-components.patch]
- annozilla/service/components->extensions/{annozilla-services}/components
- annozilla/service/components->extensions/{annozilla-services}/components
- Toolbar with Load button, Outline, Non-modal annotation examples
- [annozilla-tools.zip]
- (as an independent extension) ->extensions/{annozilla-tools@infolab.umdnj.edu}/components
Let me know! cgreg at cgreg.com or use the Annozilla mailing list