Archimedes Project page image and figure attribute insertion

The web-based ficus tool is now obsolete. It has been replaced by a new implementation in XSLT. The new ficus.xsl may be used from within Arboreal or with a standard XSLT processor.

The stylesheet is available at:



Ficus inserts attributes for page images and figures into an XML text in the Archimedes format. Each <pb> and <figure> tag gets both an xlink:href and an id attribute. Attributes are assigned according to the conventions for locators established in the document Archimedes Project Repository: Working Draft 4.

Use within Arboreal

This is the preferred method for most Archimedes Project users. Choose one of the three methods described below, and then skip to the Using Ficus subsection.

Installation: The easy way

As of Arboreal 4.9, scripts can be installed automatically. So long as the scriptbase is properly set (http://archimedes.fas.harvard.edu/cgi-bin/), you can select Install scripts from the Transform menu, select the Ficus item, and click OK.

Installation: The somewhat less easy way

To make Ficus available from the Transform menu, copy ficus.xsl into the scripts directory located within your personal arboreal directory. When Arboreal is restarted the next time, the Ficus menu option will be available under the Transform menu.

Don't feel like installing anything?

Your choice. You can directly use the script from its standard location by entering the URL

directly into the dialog presented when you select the XSL transform... option from the Transform menu.

Using Ficus

  1. Open the document you wish to process in Arboreal.
  2. If you've installed Ficus locally, select the Ficus option from the Transform menu. Alternatively, you may follow the instructions under Don't feel like installing anything? above.
  3. You will be prompted for a value for the parameter 'image-series'; the default is 01. For further information, see the documentation of standards for image locators.
  4. Arboreal will create a document with the inserted attributes and open it in a new window. (This process may take several seconds.)
  5. You may now save the resulting document (by selecting Save XML document... from the popup (context) menu.

Use with an XSLT processor

It should also be possible to use the stylesheet with a standard XSLT processor. For example, using xsltproc (a tool distributed with libxml):

xsltproc --stringparam image-series 02 ficus.xsl monte_mecha_036_la_1577.xml

Expect invocation syntax to vary between processors.

Comments and suggestions

Comments and suggestions are welcome, and may be addressed to:

Last modified: Wed Aug 25 11:13:02 EDT 2004

Valid HTML 4.01!