Hi Lucien, On May 15, 2009, at 6:07 PM, [email protected] wrote:
> Hi all, > > Since annotation prototype seems to be stable enough, great! > I'm proposing you > to add it to myxwiki.org in order to test it and to get feed back > about > bugs and UI improvements. > > > *Annotation location retrieval system* > > We chose to use a typographic alteration system in order to map a > selection from html document to the xwiki source which had generated > it. > So, each non alphanumeric character is deleted whereas others becomes > uppercase. After matching the altered selection in the altered source, > we are enable to deduce real ''offsets'' from ''altered'' offsets > (having previously filled a hash map). Could you elaborate on why do you have to remove non-alphanumeric chars? Does it mean the annotation doesn't work with internationalization? (like chinese chars, etc)? Same for why do you also have to transform all chars in uppercase? Maybe the best would be if you could update the Annotations page on http://dev.xwiki.org/xwiki/bin/view/Design/AnnotationFeature > *Rendering* > In order to produce an annotated html code we inject in the document > xwiki source marks and render it. When you say wiki source do you mean wiki syntax? If so what are the markers and how do you make this work independently of the syntax used (creole, confluence, etc even HTML input syntax)? The only solution I can think of is for you to use the XDOM and only support source syntaxes for which we have a syntax renderer. Is that what you are doing? For xwiki 2.0 syntax I guess you're using (% param=value %) for markers right? How do you manage to do this across document elements (for example if your selection encompasses both a header + a paragraph)? > Then we replace marks by span markups. hmm does this mean you have written your own XHTML renderer? Why not use the default XHTML renderer (since this is what it does for FormatBlocks)? > In order to avoid ''tag crossing'' (<c><d></c></d>) annotation zone > can > be splited in several span tags. > > *Architecture and Installation* > > This feature implementation can be divided in three modules : > > http://svn.xwiki.org/svnroot/xwiki/sandbox/xwiki-plugin-annotation/ > This plugin provide the logic side of the feature: > - determining annotation location > - adding annotation to the document > - rendering and injection of span hmmm I think this would be written as components using the new architecture. Why do you need a plugin for? And if you need a plugin the 3 features you've listed should be done as components IMO. > it require a standard plugin installation process. > > http://svn.xwiki.org/svnroot/xwiki/sandbox/xwiki-rest-annotation/ > This module provide a rest interface in order to communication with > plugin. > > Communication is done using this rest resource : > http://{host}/xwiki/rest/wikis/xwiki/spaces/{space}/pages{page}/ > annotation > > A GET request returns generated and annotated html and the set of > annotations in the page. > > A PUT request aims to add an annotation to resource. > > To install it, web.xml must be modified: > <!-- RESTful API Restlet servlet --> > <servlet> > <servlet-name>RestletServlet</servlet-name> > <servlet-class> > org.xwiki.rest.XWikiRestletServlet > </servlet-class> > <init-param> > <param-name>resources</param-name> > <param-value> > ... > com.xpn.xwiki.rest.annotation.AnnotationService; > </param-value> > </init-param> > ... It's too complex for the users and not dynamic enough IMO. I suggest you work with Fabio to provide a generic REST servlet that can be extended internally using components when we need to add new REST APIs. > http://svn.xwiki.org/svnroot/xwiki/sandbox/xwiki-application-annotation/ > > This is the client side of the feature, it use rest interface in order > to request an annotation, retrieve html annotated content and put in > the > DOM. > it's a xar package which must be imported. > > *Prototype usage* > Just select a non dynamique data in page content, an annotation > edition > box should appear, fill it and validate. > To display annotation just click on Annotations > Show annotations > menu > item. Annotation is a great feature for XWiki. What you've done sounds good and I'm very eager that we work together from now on to integrate this into XWiki core/XE. Thanks -Vincent _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs

