Print whole book
Reference documentation for Anastasia
 Preface: about Anastasia 2.0
 1 Overall architecture
  1.1 Anastasia identifiers
  1.2 The .ngv file
  1.3 The .sgv file
  1.4 The .rdv file
  1.5 The .sgp file
  1.6 The .idx file
  1.7 Calls to Anastasia through http
  1.8 The AnaRead.cfg file
   1.8.1 The books variable
   1.8.2 The gAnaGrove variable
   1.8.3 Starting to read books in CD-ROM mode
  1.9 Mixing Anastasia with html and other files
   1.9.1 A simple HTML file
   1.9.2 Other differences between the server and CD-ROM modes
 2 Formatting output through .anv files
  2.1 Using Tcl processes to determine output
   2.1.1 How it works in outline
   2.1.2 An example process
   2.1.3 Using the document hierarchy to determine formatting
   2.1.4 The begin and end processes
   2.1.5 The text variable
   2.1.6 The hide variable
   2.1.7 Using text and hide together to create a table of contents
  2.2 Treatment of SDATA and PCDATA
   2.2.1 Treatment of SDATA
   2.2.2 Treatment of PCDATA
  2.3 Default values in the style interpreter
   2.3.1 outputSGML
   2.3.2 startSGML endSGML closeSGML: formatting SGML/XML output
   2.3.3 tocLevels
   2.3.4 url and bookname
   2.3.5 Reading many books at once
  2.4 Debugging .anv files
   2.4.1 Error messages and seeing the results of changes to the .anv file
   2.4.2 puts: following events in the .anv file
   2.4.3 outputMax: debugging document chunking
   2.4.4 fileLength: how much has been written
 3 Document chunking: setting start and endpoints
  3.1 startEl -- resetting the starting element
  3.2 outputSiblings outputRight — setting the output span
  3.3 finish -- setting an arbitrary end point
 4 Property value command extensions
  4.1 Commands giving information about an element
   4.1.1 giName
   4.1.2 giPath
   4.1.3 attrList
   4.1.4 attr
   4.1.5 attrNames
   4.1.6 sDataName
   4.1.7 sDataValue
   4.1.8 contentType
   4.1.9 content
   4.1.10 contentLength
  4.2 Commands finding elements in the document hierarchy
   4.2.1 ancestor
   4.2.2 child
   4.2.3 leftSibling
   4.2.4 rightSibling
   4.2.5 previous
   4.2.6 next
 5 The httpinf array: getting browser information
 6 The httppost array: passing Anastasia information
  6.1 Passing variables into Anastasia
 7 Searching with Anastasia
  7.1 Search commands in Anastasia
   7.1.1 countSG
   7.1.2 findSGText tsBegEl tsBegTxt tsEndEl tsEndTxt sgtReturned sgtFound
   7.1.3 findSGElement esElIds sgReturned sgFound
   7.1.4 Searching part of a document: startSGElement endSGElement
  7.2 SGREP search strings
  7.3 Formatting the search results in Anastasia
   7.3.1 The prevChars nextChars theseChars command extensions
   7.3.2 The makeKWIC command extension
   7.3.3 The found process: showing hits in context
  7.4 Indexing very large files in Anastasia
   7.4.1 How much physical memory do you need for indexing large files?
   7.4.2 Modifications to SGREP indexing made by Anastasia: disk buffering
   7.4.3 Controlling memory usage while indexing large files with Anastasia
   7.4.4 Guideline figures and settings for memory usage when indexing large files
   7.4.5 Monitoring memory usage when indexing large files
 8 Customizing GroveMaker
 9 Troubleshooting
  9.1 Troubleshooting Tcl
  9.2 Problems with Anastasia
Reference documentation for Anastasia > Preface: about Anastasia 2.0 >
Previous   Print this chapter   Next

Preface: about Anastasia 2.0

Version 2 of Anastasia, released in May 2003, is the result of a near-complete rewrite of the core routines underlying the program. The basic architecture of the program remains unchanged, and all files made with previous versions of the program will run without alteration, or with very little alteration. However, ‘under the hood’ almost everything is different. Our aim was to make Anastasia run securely and fast, in the most demanding server environments, with very large quantities of data. Here are some of the major differences:

  • Support for XML is much improved. Anastasia formatting and search functions now expect (in default mode) that element and attribute names will be case-sensitive. However, Anastasia retains a relaxed model of XML conformancy. For example, we find that SDATA (see next) remains very useful.
  • Anastasia now supports Unicode and UTF-8. Characters may be entered either as hexadecimal entities, or directly as UTF-8. By default, Anastasia will express all characters as UTF-8, greatly improving browser performance. The powerful SDATA facilities in Anastasia 1.0 are retained, to reach the parts which Unicode cannot. Searches for all Unicode characters are now enabled, including for Chinese and Japanese.
  • GroveMaker is now parameterizable, to control more precisely the processing of source XML/SGML.
  • Error notification is now written whereever possible to the output browser window, greatly aiding development of Anastasia scripts
  • All memory routines have been completely rewritten, to improve Anastasia’s speed, its ability to cope with large quantities of data, and, above all, to render it as bullet-proof as possible. These routines include ‘failsafes’ to force an Anastasia process to exit if it is in danger of running out of control.
  • The Anastasia reader no longer makes any use of the .sgp file. As a result this can be discarded once the .idx file is built. For CD-ROM distributions, this may save a great amount of disc space. It also allows developers to hide all the source XML, if they wish.
  • The CD-ROM instance of Anastasia, for both Macintosh and Windows, has been tuned to make it easier to distribute books on CD-ROM. For example: users may now easily download all the software and books to their hard disk, or run Anastasia direct from the CD-ROM.
  • Anastasia has been more tightly integrated with Apache, in both Macintosh and Windows modes, with consequent benefits to stability and speed. Text is now written progressively to the browser window as it is processed.
  • The implementation of the Anastasia ‘AnaRead.cfg’ configuration files has been revised, to permit each book to have its own configuration file.
  • The Anastasia server is now completely ‘dynamic’. In earlier versions you had to restart the server each time a book was added, deleted or updated. Now, you can add, delete or update any book at any time and Anastasia will read the new book without missing a beat.
  • Anastasia now fully supports multiple books. You can search any book from any book, or extract data from any book and include it in any other book, right from inside the style files.

All this has not come entirely without a price. We have had to abandon the Macintosh Classic environment (after eighteen years of programming for it!) Finally, Classic just would not support the memory and server functions we needed. However, the compensation - the remarkable Macintosh OS X - is more than adequate.

In the following documentation, significant differences in 2.0 over earlier versions (there are scores, even hundreds) are signalled by the note Anastasia 2.

Previous   Print this chapter   Next