[greenstone-devel] CUSTOMIZING METADATA.XML FILE TO INCLUDE AUTOMATIC METADATA

From Pablo San Juan
DateFri Mar 28 22:28:20 2008
Subject [greenstone-devel] CUSTOMIZING METADATA.XML FILE TO INCLUDE AUTOMATIC METADATA
Hi Greenstone Development List,

I need your help. I□m testing Greenstone 2.80 release and I□m trying
to use MetadataXMLPlug plugin in order to include automatic metadata to
my collection files.

Here is an extract from metadata.xml file:

<DirectoryMetadata>
<FileSet>
<FileName>w{3}d{8}.pdf</FileName>
<Description>
<Metadata mode="override" name="pren.Fecha">$1</Metadata>
</Description>
</FileSet>

It□s a newspaper□s collection. The filenames of my collection are
like "ABC20080327.PDF"; the three first characters indicates newspaper
abreviature, and next 8 characters indicate new date(year,month and day).
In <Filename> tag I□m using a perl expression and I want to use its
match to insert this value as new metadata value in metadata tag. How
can I use $1 variable (the match result in perl expression) in Metadata tag?

Thank you very much for your help.

Best Regards,
Pablo
IT Manager.