Anastasia home

How Anastasia differs from XSLT

A summary of how Anastasia does its business is contained in How Anastasia works: the processing model. There, we describe Anastasia as "an event-driven procedural environment for handling XML document collections".

Thus, Anastasia differs rather radically from the XSL family of XML processing tools. These are languages for processing structured data, built essentially on pattern-matching algorithms. They assume a document model where all is held in a single well-ordered hierarchical tree. In contrast, Anastasia assumes that any document is composed of a series of events which are defined not only by their hierarchical relation, but also by their left-to-right relation in the document stream. Indeed, it could be used to process text containing no hierarchical structure at all.

This difference has significant consequences. It means that certain types of processing which can be rather difficult with XSLT and its relatives are rather easy in Anastasia. Especially, in Anastasia one can start processing a document at any point within it (an empty element, or indeed at any character within the text flow) and carry on to any other point (another character, the start or end of any element), with complete understanding of all that is met between the two points. Indeed, one Anastasia function allows you to to do this backwards: to start at one point, move back a specified number of characters, and then forward again. A result of this is that it is straight-forward in Anastasia to manipulate a document according to alternative hierarchies implicit in the element relations: thus one can show just one column or one page of a text otherwise structured in hierarchical divisions.

A further difference is that Anastasia by design includes all that might be needed to process and publish large XML document collections, within a single programming environment. Typically with XSLT and its relatives, you must install the server and various processing modules, including separate search and (perhaps) database facilities. There are many implementations which seek to make this as easy as possible: but it is inevitable that the need to ensure that all the various parts move smoothly together demands significant system skills and time. Anastasia bundles the server, parsing, searching, and display handling into a single package. The aim is to make it possible for individual users with a reasonable level of computer skills (often, an academic working on his or her own) to make high-quality electronic publications with only minimal technical support.

A further difference used to be that XSLT and its relatives are "free", with many open-source tools. However, as of June 2004, Anastasia too is open source, under the Gnu General Public License. A significant motivation for this is to enable others to extract pieces of Anastasia which might be useful in other environments, and adapt them for other uses. (For example: rolling some of Anastasia's XML capabilities into Perl or PHP would create a rather wonderful tool).

This does not mean, at all, that Anastasia is the best tool for every XML publishing purpose. It has been developed with particular kinds of document in mind, especially large collections of complexly-structured data where it is desired to view the data in many different ways, according to multiple hierarchies implicit in the data stream. Thus, it is very good at building real-time views from data scattered all over the XML, and for showing page-by-page text which cuts across element divisions. If your data is like that, and that is what you want to do, you may find she is just what you need.