Re: [greenstone-users] Items in hierarchical list displayed asUntitled

From Rene Schrama
DateTue, 18 Nov 2003 13:54:27 +0100
Subject Re: [greenstone-users] Items in hierarchical list displayed asUntitled
Thanks for your help, it works like a charm now although it took some
doing because I had to extract the information from an Oracle database
with PL/SQL. For what it's worth, the files I created are at the bottom
of this message. A coincidental side-effect is that the "single quote"
problem (Jong Hann) will never occur because only the numbers are
compared (not the keywords).


Hierarchy file:

1 1 "a posteriori comparisons"
1.401 1.401 "Use: post hoc comparisons tests"
2 2 "a priori comparisons"
2.401 2.401 "Use: planned comparisons tests"

Lookup table (will be sorted on keyword, for better performance) used
to replace keywords with numbers during creation of metadata.xml:

a posteriori comparisons=1
post hoc comparisons tests=1.401
a priori comparisons=2
planned comparisons tests=2.401


<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE DirectoryMetadata SYSTEM
<Metadata name="Subject" mode="accumulate">141.301</Metadata>
<Metadata name="Subject" mode="accumulate">142.301</Metadata>
<Metadata name="Subject" mode="accumulate">143.301</Metadata>
<Metadata name="Subject" mode="accumulate">144.401</Metadata>
<Metadata name="Subject" mode="accumulate">145</Metadata>

>>> "Stefan Boddie" <> 13-11-2003 21:23:21
Hi Rene,

The first column in your hierarchy file must be unique but does not
have to
be the same value as the third column.

So instead of the following:

"bar charts" 125 "bar charts"
"bars" 125.401 "Use: bars"
"bar graphs" 126 "bar graphs"
"bars" 126.401 "Use: bars"
"bars" 129 "bars"

you should use something more like

"unique1" 125 "bar charts"
"unique2" 125.401 "Use: bars"
"unique3" 126 "bar graphs"
"unique4" 126.401 "Use: bars"
"unique5" 129 "bars"

The first column is what your document metadata must match against in
to be assigned to the correct section of the hierarchy. The third
column is
the term that greenstone outputs when displaying the hierarchy.

To assign the same document to more than one hierarchy section you'll
to set metadata for it for each section. For example, if you were
"Keyword" metadata for your hierarchy classification, and you wanted a
particular document to appear under both section 125.401 and section
and if your hfile was set up as in the example above, you'd need to
something like the following in your metadata.xml file:

<Metadata name="Keyword">unique2</Metadata>
<Metadata name="Keyword">unique5</Metadata>

Hope this helps.