[Refdb-cvs] CVS: refdb/scripts libgen.pl,1.5,1.5.2.1
Status: Beta
Brought to you by:
mhoenicka
From: Markus H. <mho...@us...> - 2004-07-29 20:47:35
|
Update of /cvsroot/refdb/refdb/scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24195/scripts Modified Files: Tag: Release_0_9_5_stable libgen.pl Log Message: fixed missing title formatting Index: libgen.pl =================================================================== RCS file: /cvsroot/refdb/refdb/scripts/libgen.pl,v retrieving revision 1.5 retrieving revision 1.5.2.1 diff -u -U2 -r1.5 -r1.5.2.1 --- libgen.pl 29 Mar 2004 21:42:59 -0000 1.5 +++ libgen.pl 29 Jul 2004 20:47:23 -0000 1.5.2.1 @@ -221,5 +221,5 @@ print "<!-- chapter title in bibliography -->\n\n"; - print "<xsl:template match=\"bibliomset[\@relation=\'chapter\']/title\" mode=\"refdb\">\n <xsl:variable name=\"reftype\" select=\"ancestor::bibliomixed/\@role\"/>\n <xsl:choose>\n"; + print "<xsl:template match=\"bibliomset[\@relation=\'chapter\' or \@relation=\'article\']/title\" mode=\"refdb\">\n <xsl:variable name=\"reftype\" select=\"ancestor::bibliomixed/\@role\"/>\n <xsl:choose>\n"; foreach $type (@types) { @@ -233,5 +233,23 @@ foreach $type (@intext_types) { - print "<xsl:template match=\"bibliomset[\@relation=\'chapter\']/title\" mode=\"$type\">\n <xsl:call-template name=\"refdb-process-inline\">\n <xsl:with-param name=\"style\" select=\"\$$type" . "TITLESTYLE\"/>\n </xsl:call-template>\n</xsl:template>\n\n"; + print "<xsl:template match=\"bibliomset[\@relation=\'chapter\' or \@relation=\'article\']/title\" mode=\"$type\">\n <xsl:call-template name=\"refdb-process-inline\">\n <xsl:with-param name=\"style\" select=\"\$$type" . "TITLESTYLE\"/>\n </xsl:call-template>\n</xsl:template>\n\n"; + } + + # series title in bibliography + print "<!-- series title in bibliography -->\n\n"; + + print "<xsl:template match=\"bibliomset[\@relation=\'series\']/title\" mode=\"refdb\">\n <xsl:variable name=\"reftype\" select=\"ancestor::bibliomixed/\@role\"/>\n <xsl:choose>\n"; + + foreach $type (@types) { + print " <xsl:when test=\"\$reftype=\'$type\'\">\n <xsl:call-template name=\"refdb-process-inline\">\n <xsl:with-param name=\"style\" select=\"\$$type" . "SERIESTITLESTYLE\"/>\n </xsl:call-template>\n </xsl:when>\n"; + } + + print " </xsl:choose>\n</xsl:template>\n\n"; + + # series title in intext citation + print "<!-- series title in intext citation -->\n\n"; + + foreach $type (@intext_types) { + print "<xsl:template match=\"bibliomset[\@relation=\'series\']/title\" mode=\"$type\">\n <xsl:call-template name=\"refdb-process-inline\">\n <xsl:with-param name=\"style\" select=\"\$$type" . "SERIESTITLESTYLE\"/>\n </xsl:call-template>\n</xsl:template>\n\n"; } @@ -400,5 +418,5 @@ print "<!-- journal title in bibliography -->\n\n"; - print "<xsl:template match=\"seg[\@type=\'JOURNAL\']/title\" mode=\"refdb\">\n <xsl:variable name=\"reftype\" select=\"ancestor::bibl/\@rend\"/>\n <xsl:choose>"; + print "<xsl:template match=\"seg[\@type=\'journal\']/title\" mode=\"refdb\">\n <xsl:variable name=\"reftype\" select=\"ancestor::bibl/\@rend\"/>\n <xsl:choose>"; foreach $type (@types) { @@ -412,5 +430,5 @@ foreach $type (@intext_types) { - print "<xsl:template match=\"seg[\@type=\'JOURNAL\']/title\" mode=\"$type\">\n <xsl:call-template name=\"refdb-process-inline\">\n <xsl:with-param name=\"style\" select=\"\$$type" . "JOURNALNAMESTYLE\"/>\n </xsl:call-template>\n</xsl:template>\n\n"; + print "<xsl:template match=\"seg[\@type=\'journal\']/title\" mode=\"$type\">\n <xsl:call-template name=\"refdb-process-inline\">\n <xsl:with-param name=\"style\" select=\"\$$type" . "JOURNALNAMESTYLE\"/>\n </xsl:call-template>\n</xsl:template>\n\n"; } @@ -418,5 +436,5 @@ print "<!-- book title in bibliography -->\n\n"; - print "<xsl:template match=\"seg[\@type=\'BOOK\']/title\" mode=\"refdb\">\n <xsl:variable name=\"reftype\" select=\"ancestor::bibl/\@rend\"/>\n <xsl:choose>"; + print "<xsl:template match=\"seg[\@type=\'book\']/title\" mode=\"refdb\">\n <xsl:variable name=\"reftype\" select=\"ancestor::bibl/\@rend\"/>\n <xsl:choose>"; foreach $type (@types) { @@ -430,5 +448,5 @@ foreach $type (@intext_types) { - print "<xsl:template match=\"seg[\@type=\'BOOK\']/title\" mode=\"$type\">\n <xsl:call-template name=\"refdb-process-inline\">\n <xsl:with-param name=\"style\" select=\"\$$type" . "BOOKTITLESTYLE\"/>\n </xsl:call-template>\n</xsl:template>\n\n"; + print "<xsl:template match=\"seg[\@type=\'book\']/title\" mode=\"$type\">\n <xsl:call-template name=\"refdb-process-inline\">\n <xsl:with-param name=\"style\" select=\"\$$type" . "BOOKTITLESTYLE\"/>\n </xsl:call-template>\n</xsl:template>\n\n"; } @@ -436,5 +454,5 @@ print "<!-- chapter title in bibliography -->\n\n"; - print "<xsl:template match=\"seg[\@type=\'CHAPTER\']/title\" mode=\"refdb\">\n <xsl:variable name=\"reftype\" select=\"ancestor::bibl/\@rend\"/>\n <xsl:choose>"; + print "<xsl:template match=\"seg[\@type=\'chapter\' or \@type=\'article\']/title\" mode=\"refdb\">\n <xsl:variable name=\"reftype\" select=\"ancestor::bibl/\@rend\"/>\n <xsl:choose>"; foreach $type (@types) { @@ -448,5 +466,23 @@ foreach $type (@intext_types) { - print "<xsl:template match=\"seg[\@type=\'CHAPTER\']/title\" mode=\"$type\">\n <xsl:call-template name=\"refdb-process-inline\">\n <xsl:with-param name=\"style\" select=\"\$$type" . "TITLESTYLE\"/>\n </xsl:call-template>\n</xsl:template>\n\n"; + print "<xsl:template match=\"seg[\@type=\'chapter\' or \@type=\'article\']/title\" mode=\"$type\">\n <xsl:call-template name=\"refdb-process-inline\">\n <xsl:with-param name=\"style\" select=\"\$$type" . "TITLESTYLE\"/>\n </xsl:call-template>\n</xsl:template>\n\n"; + } + + # series title in bibliography + print "<!-- series title in bibliography -->\n\n"; + + print "<xsl:template match=\"seg[\@type=\'series\']/title\" mode=\"refdb\">\n <xsl:variable name=\"reftype\" select=\"ancestor::bibl/\@rend\"/>\n <xsl:choose>"; + + foreach $type (@types) { + print " <xsl:when test=\"\$reftype=\'$type\'\">\n <xsl:call-template name=\"refdb-process-inline\">\n <xsl:with-param name=\"style\" select=\"\$$type" . "SERIESTITLESTYLE\"/>\n </xsl:call-template>\n </xsl:when>\n"; + } + + print " </xsl:choose>\n</xsl:template>\n\n"; + + # series title in intext citation + print "<!-- series title in intext citation -->\n\n"; + + foreach $type (@intext_types) { + print "<xsl:template match=\"seg[\@type=\'series\']/title\" mode=\"$type\">\n <xsl:call-template name=\"refdb-process-inline\">\n <xsl:with-param name=\"style\" select=\"\$$type" . "SERIESTITLESTYLE\"/>\n </xsl:call-template>\n</xsl:template>\n\n"; } |