This version (2014/04/14 11:52) is a draft.
Approvals: 0/1

Table of Contents

XML Documents

There are two main options for getting XML files into Greenstone: using XSL or writing a customised plugin.

XSL

Outside of Greenstone, you can use XSL (or other procedure) to generate either HTML, which can be processed by HTMLPlugin, or Greenstone Archival Format files. If you generate archive files, you will not need to run the import phase of collection building. You will also not be able to build the collection in the Librarian Interface. You can use the Librarian Interface to configure your collection, but you will need to build it on the command line. See here for information about command line building.

New Plugin

The other option is to write a new plugin to process your particular XML format. This plugin will inherit from XMLPlugin. You need to implement the new method, as well as the XML parsing call back methods, such as xml_doctype, xml_start_tag, xml_end_tag, xml_text. The plugin will parse the source XML file and build up a doc object in memory, which gets written out as an archive file. greenstone/perllib/plugins/GreenstoneArchivesPlugin.pm is an example of a plugin that inherits from XMLPlug—you can use this as an example.