changeset 28:3ff9da4b7c87

added derived-from
author casties
date Tue, 16 May 2006 20:58:21 +0200
parents 2890dd75d2f6
children f77f6cb40c4f
files makemeta-lib.pl
diffstat 1 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/makemeta-lib.pl	Fri Feb 10 18:01:18 2006 +0100
+++ b/makemeta-lib.pl	Tue May 16 20:58:21 2006 +0200
@@ -10,7 +10,7 @@
 $|=1;
 
 # program version
-my $version = "0.2.2 (31.8.2005 ROC)";
+my $version = "0.2.3 (16.5.2006 ROC)";
 my $help = 
 "use: makemeta-lib [options] file.xml
 options:
@@ -417,11 +417,13 @@
     $index_root->addChild($index_doc->createAttributeNS($namespace, 'version', '1.1'));
     $index_root->addChild($index_doc->createAttributeNS($namespace, 'type', 'MPIWG'));
     $index_doc->setDocumentElement($index_root);
+    my $derived_from = "";
 
     # try to find the document directory
     my $doc_dir = "";
     if ($online_mode) {
 	$doc_dir = find_permanent_dir($input_node);
+	$derived_from = find_arch_dir($input_node);
     } elsif ($cw_mode) {
 	$doc_dir = find_cw_dir($input_node);
     } elsif ($digifiles_mode) {
@@ -450,6 +452,10 @@
     # media
     create_text_path('media-type', 'image', $index_root, $namespace);
     create_text_path('meta/content-type', 'scanned document', $index_root, $namespace);
+    # derived-from
+    if ($derived_from) {
+       create_text_path('derived-from/archive-path', $derived_from, $index_root, $namespace);
+     }
 
     # convert bib entries
     my $cnt = convert_bib($input_node, $index_root, $index_doc);