[greenstone-users] importing snippets of HTML (fwd)

From Benjamin Weaver
DateThu, 12 May 2005 20:43:18 +0100 (BST)
Subject [greenstone-users] importing snippets of HTML (fwd)
Hello Greenstone Staffers,

I would like to import snippets of HTML when building collections. The
snippets would not be complete HTML pages, but, say, no more than a simple
HTML table, stored in a text file in the appropriate import subdirectory. The
rest of the HTML display page, the Title, and so on, I want to build from
metadata.xml and Greenstone macros.

For example, the imported text file would containing nothing more than:

<table> ... </table>.

Currently we build using import data consisting of a metadata.xml file and a
complete HTML document. This arrangment is not satisfactory since Title
metadata is drawn from the HTML file, not from the metadata.xml file as I want
it to be, and even display elements common to all items in a collection have
to be rebuilt and maintained in each of the individual imported HTML
documents. I would like to use imported HTML only for the purpose of
formatting that part of the display which is unique to that document (tables
including links to variable numbers of multiple images) which I can not format
in a Greenstone macro. A simple solution is to pre-construct only the
variable-length HTML table and import this snippet.

I tried using TEXTPlug to import the raw text of the HTML table, but it did
not seem to work. How do I import a snippet of HTML while drawing all
metadata, including Title, from my xml file? Ought I use HTMLPlug with some
option argument, or TEXTPlug for the snippet?

Thank you for any ideas in advance,

Benjamin Weaver
Researcher, Imaging Papyri Project/The Herculaneum Society
email: benjamin.weaver&#64;classics.oxford.ac.uk
phone: (0)1865 288260

-----End of forwarded message from Benjamin Weaver
<benjamin.weaver@classics.oxford.ac.uk> -----

Benjamin Weaver
Researcher, Imaging Papyri Project/The Herculaneum Society
email: benjamin.weaver@classics.oxford.ac.uk
phone: (0)1865 288260