Subject: XLinkFilter: Open-source library in development Author: Simon St.Laurent Email: email@example.com Date: 1998/11/11 To: comp.text.xml
After spending the last few months talking and talking about how amazingly cool XLink _could_ be, I've taken a few steps toward _doing_ things with XLink. The steps aren't lovely or stupendous (yet), but I hope that they might represent a step forward. The code is not yet ready for prime time, but the discussions on the XML-Dev list makes it fairly clear that there is a need for this kind of project.
Working from the 3/3/98 Working Draft, I've put together a few small Java examples that use XLink and am at work on a library based on John Cowan's ParserFilter class that extracts the linking information from a document, allowing the application to process the document without having to deal with the issues involved in creating and managing links. Right now the library supports simple and extended links, but not hub groups or attribute remapping. I'm planning on adding legacy support for HTML's A element at some point in the future as well.
The examples are from Building XML Applications, and were small, simple, one-off applets. They can be found at the bottom of http://www.simonstl.com/buildxml/. They use image maps (my handling of text link proved disastrous) and are unfortunately a bit slow as a result. They pretty much just show what some _very_ simple XLink applications might look like. The source code for these examples will be in the book, and (if I can get the necessary permissions from my editor) may appear online as well.
The library is and will be open source, though at this point I haven't firmly decided on a license. (GPL is likely, in some slightly modified form.) I should emphasize that the library is in (fairly ugly) alpha form; the feature set is not yet nearly complete, especially the LinkSet class. The basic XLinkFilter has worked on the samples on which I've tested it, transforming multi-directional links into more workable sets of single direction links. The LinkSet is an extended Vector, but will probably change to something more flexible when Java 1.2 comes along. (I will try to keep a 1.1 version, however.) Information on the XLinkFilter and supporting code is at http://www.simonstl.com/projects/xlinkfilter/.
This filter only handles XLink; XPointer is a necessary complement, but another large piece to deal with. Support for a DOM model in addition to SAX is another necessary piece, but one that I haven't yet begun.
Documentation at present is weak, and the comments in the code aren't enough. They will improve, and I will add real JavaDoc comments as well. (Promise!)
All contributions/modifications/suggestions on functionality, code, licensing, etc. are welcome. I'll be in and out for the next few days, but will be returning to more focused work on this library over the weekend.
Simon St.Laurent Dynamic HTML: A Primer / XML: A Primer Cookies / Sharing Bandwidth (November) Building XML Applications (December) http://www.simonstl.com