Re: [greenstone-devel] escaped '[' and ']' in metadata in GLI

From John M Thompson
DateTue, 12 Aug 2003 16:31:17 +1200
Subject Re: [greenstone-devel] escaped '[' and ']' in metadata in GLI
In-Reply-To (OFBF59439F-C1EA503B-ON69256D7F-002665AF-69256D7F-002665D8-ntu-edu-au)
Hello Stephen,

Thats twice now you've caught me out when I've assumed something without
checking. I had thought that since XML doesn't pay any special attention
to the escape character that it would be safe to use it as a path
separator when defining value hierarchies. I had overlooked the fact
that you have to escape '[' and ']' or else they are believed to be
special characters by the Greenstone Runtime System.

Unfortunately there isn't really a workaround (other than not using '['
and ']'), so instead I have fixed this problem in the code and produced
a 'patch'. I've tried to ensure legacy collections will load, however
once you have installed the patch collections previously built with GLI
containing hierarchies may not load properly (as I've replaced the path
separator with a double escape, rather than a single). Thus I suggest
you back them up before trying the patch. The patch is available from here:

Place into your GLI installation folder and unzip, allowing it to create
several files/folders within the classes folder. If you're on linux you
can unzip it using "jar -xf".

Also the current bug status of the project, which may be of interest, is
available at:

John Thompson
Greenstone Digital Library, University of Waikato,
New Zealand wrote:

>I use a fairly common idiom in creating my metadata; putting square
>brackets [ and ] around information about the document that the cataloguer
>derived from a source other than one of the prescribed sources of this
>information (al la AACR2).
>an example is:
> <Metadata name="Creator" mode="accumulate"> Guimaraes : sociedade
>Martins Sarmento[publisher]</Metadata>
>Is is also use for a date on undated materials [1953] or sometimes [1953?]
>when the cataloguer is unsure.
>I am using the '' escape character to insert these characters in my
>collection, so far with no problem.
>I tried importing my files and metadata into GLI so I could take advantage
>of it's superior metadata facilities, only to find it does not recognise
>the escape characters. (I get folders named '[' and chopped up fields).
>Does anyone know how to get around this?
>greenstone-devel mailing list