- From: Richard Kaye <R.W.Kaye@bham.ac.uk>
- Date: Tue, 15 Jul 2003 12:52:10 +0100
- To: www-annotation@w3.org
Dear all, I am still developing these scripts. I have now written a CGI script that takes the output from a simple form (submitted using http GET) and adds annotations to the document requested from an annotation server. It then returns the annotated document, which has been altered so that the href in the <a href="..."> tags now point to the same CGI script (with suitable parameters) so that when the user clicks this hyperlink he/she sees another document annotated by the same server. The main advantage is that this will work with any browser. (I have a screen shot of it working in konqueror at http://www.mat.bham.ac.uk/R.W.Kaye/annotations_screenshot.png As far as I know konqueror on its own doesn't understand annotations :-) Another advantage is that since all the info is passed to the CGI script via the http://blah.com/blah.cgi?param1=value¶m2=value syntax, by using this syntax in the "href" of your own hyperlinks in your own (X)HTML, you can make hyperlinks that will send the reader to a specific document with annotations taken from a specific annotation server. It is all transparent to the reader, and no special configuration to the browser is required. The downsides include the fact that some server-side processing is required. (Perhaps this can be justified as providing some useful service to a client. -- I think it can in my case.) The other downside is that at the moment there are lots of ways that the scripts will fail, or at least fail to produce good HTML. For example, if the target document uses the <base> tag the hyperlinks won't be right, and quirky documents or annotations will confuse things a lot. (E.g., the current version of the script produces odd results if the document has an annotation of an <a> tag.) Nevertheless, I *still* think there are some useful ideas here and would be glad for other people's comments. Files: The main XSL stylesheet: http://www.mat.bham.ac.uk/R.W.Kaye/annotation2xsl.xsl (updated since last post) The CGI script: http://www.mat.bham.ac.uk/R.W.Kaye/annotate.cgi The graphics: http://www.mat.bham.ac.uk/R.W.Kaye/pencil.png http://www.mat.bham.ac.uk/R.W.Kaye/annotations_screenshot.png A simple driver form to get things started: http://www.mat.bham.ac.uk/R.W.Kaye/getannotateddoc.html You'll need at least mod_perl, LibXML, LibXSLT and libtidy if you want to get things working at your end. Best wishes to all annotators Richard On Monday 07 July 2003 11:46, Richard Kaye wrote: > Dear all, > > I just written an XSL stylesheet that tries to attach icons and > links for annotations to a XHTML document. There are a number > of problems still, not least the fact that my stylesheet does not always > produce valid HTML (and it may be that because of this, this task is > doomed to ulitimate failure) but it seems to work well enough for it to be > of some immediate uses, and it may well be of interest to others here. > > The stylesheet is at http://www.mat.bham.ac.uk/R.W.Kaye/annotation2xsl.xsl > You'll probably want to download > http://www.mat.bham.ac.uk/R.W.Kaye/pencil.png too. There are instructions > in the code itself. > > Currently, to use it, download the rdf containing the annotation(s) > from the annotation server and also download the actual document itself > from the web using wget or whatever. Then run XSLT twice: > 1. annotation2xsl.xsl on the rdf doc to produce a second xsl stylesheet > 2. the new stylesheet is the one that transforms the actual document. > > There are various configuration variables you will need to set to your > taste, and you may want to set up all of the above in a nice command line > script or cgi script or something. > > Comments welcome. > > Best wishes > > Richard Kaye
Received on Tuesday, 15 July 2003 07:56:32 UTC