Add publication year to corpus title
Resolves #13
diff --git a/test/test-xml.sh b/test/test-xml.sh
index 154ba43..0d1e629 100755
--- a/test/test-xml.sh
+++ b/test/test-xml.sh
@@ -17,7 +17,7 @@
if $(assert_eq "$observed" "$TEXTS"); then
log_success "$I5_FILE contains $TEXTS idsText elements"
else
- log_failure "$I5_FILE does not contain $TEXTS idsText elements"
+ log_failure "$I5_FILE does not contain $TEXTS idsText elements, but: $observed"
fi
@@ -25,12 +25,19 @@
if $(assert_eq "$observed" "$TEXTS"); then
log_success "$I5_FILE contains $TEXTS non-empty h.author elements"
else
- log_failure "$I5_FILE does not contain $TEXTS non-empty h.author elements"
+ log_failure "$I5_FILE does not contain $TEXTS non-empty h.author elements: $observed"
+fi
+
+observed=$(xmlstarlet sel --net -t -v "/idsCorpus/idsHeader/fileDesc/titleStmt/c.title" target/dnb13.i5.xml)
+if $(assert_eq "$observed" "Deutsche Nationalbibliothek: Belletristik 2013"); then
+ log_success "c.title contains yeaar"
+else
+ log_failure "c.title does not contain year: $observed"
fi
observed=$(xmlstarlet sel --net -t -v "count(/idsCorpus/idsDoc/idsText/idsHeader/fileDesc/sourceDesc/biblStruct/monogr/h.author[contains(., '[')])" target/dnb13.i5.xml)
if $(assert_eq "$observed" "0"); then
log_success "authors do not contain []"
else
- log_failure "authors contain []"
+ log_failure "authors contain []: $observed"
fi
\ No newline at end of file
diff --git a/xslt/idsCorpus-template.xml b/xslt/idsCorpus-template.xml
index 4d042cb..ae2be25 100644
--- a/xslt/idsCorpus-template.xml
+++ b/xslt/idsCorpus-template.xml
@@ -5,7 +5,7 @@
<fileDesc>
<titleStmt>
<korpusSigle>DNB{YY}</korpusSigle>
- <c.title>Deutsche Nationalbibliothek: Belletristik</c.title>
+ <c.title>Deutsche Nationalbibliothek: Belletristik 20{YY}</c.title>
</titleStmt>
<publicationStmt>
<distributor>Deutsche Nationalbibliothek</distributor>