[Refdb-cvs] CVS: refdb/scripts libgen.pl,1.5.2.2,1.5.2.3
Status: Beta
Brought to you by:
mhoenicka
From: Markus H. <mho...@us...> - 2004-11-27 23:14:00
|
Update of /cvsroot/refdb/refdb/scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23772/scripts Modified Files: Tag: Release_0_9_5_stable libgen.pl Log Message: generate matchlist for biblScope elements dynamically Index: libgen.pl =================================================================== RCS file: /cvsroot/refdb/refdb/scripts/libgen.pl,v retrieving revision 1.5.2.2 retrieving revision 1.5.2.3 diff -u -U2 -r1.5.2.2 -r1.5.2.3 --- libgen.pl 25 Nov 2004 21:32:41 -0000 1.5.2.2 +++ libgen.pl 27 Nov 2004 23:13:47 -0000 1.5.2.3 @@ -297,6 +297,15 @@ # "elements" which are in fact biblScope elements with an attribute -#todo: generate match list dynamically from tei_biblscope_elements - print "<!-- biblScope elements in the bibliography -->\n<xsl:template match=\"biblScope[\@type=\'pages\']|biblScope[\@type=\'volume\']|biblScope[\@type=\'issue\']|biblScope[\@type=\'issn\']|biblScope[\@type=\'isbn\']\" mode=\"refdb\">\n <xsl:variable name=\"reftype\" select=\"ancestor::bibl/\@rend\"/>\n <xsl:choose>\n"; + # generate match list dynamically from tei_biblscope_elements + print "<!-- biblScope elements in the bibliography -->\n<xsl:template match=\""; + + foreach $element (@tei_biblscope_elements) { + $match = $match . "biblScope[\@type=\'$element\']|"; + } + + # remove trailing pipe char + chop($match); + print($match); + print "\" mode=\"refdb\">\n <xsl:variable name=\"reftype\" select=\"ancestor::bibl/\@rend\"/>\n <xsl:choose>\n"; foreach $element (@tei_biblscope_elements) { |