File: extended.xsl

package info (click to toggle)
bodr 10-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye
  • size: 2,548 kB
  • sloc: xml: 29,107; sh: 494; makefile: 182
file content (89 lines) | stat: -rw-r--r-- 2,335 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
		xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
		xmlns:bibtex="http://bibtexml.sf.net/">

  <!--
      The following adds support for BibTeXML extended schema

      This style sheet is reusing code (it is imported
      by bibtex.xsl and strict-bibtexml.xsl):

         <xsl:include href="extended.xsl"/>

  -->

  <xsl:strip-space elements="*"/>
  <xsl:template match="text()">
    <xsl:value-of select="normalize-space(.)"/>
  </xsl:template>

  <xsl:template match="bibtex:person">
    <xsl:apply-templates/>
    <xsl:if test="not(position()=last())">
      <xsl:text> and </xsl:text>
    </xsl:if>
  </xsl:template>

  <xsl:template match="bibtex:person/*">
    <xsl:apply-templates/>
    <xsl:if test="not(position()=last())">
      <xsl:text> </xsl:text>
    </xsl:if>
  </xsl:template>

  <xsl:template match="bibtex:title/bibtex:title|
		       bibtex:chapter/bibtex:title">
    <xsl:apply-templates/>
  </xsl:template>

  <xsl:template match="bibtex:title/bibtex:subtitle|
		       bibtex:chapter/bibtex:subtitle">
    <xsl:text>: </xsl:text>
    <xsl:apply-templates/>
  </xsl:template>

  <xsl:template match="bibtex:chapter/bibtex:pages">
    <xsl:text>, pp. </xsl:text>
    <xsl:apply-templates/>
  </xsl:template>

  <xsl:template match="bibtex:keyword">
    <xsl:apply-templates/>
    <xsl:if test="not(position()=last()-1)">
      <xsl:text>, </xsl:text>
    </xsl:if>
  </xsl:template>


  <xsl:template name="bibtexml-latex-warning">
    <xsl:text disable-output-escaping="yes"><![CDATA[
%%% BibTeX-file {
%%%    author	 = "",
%%%    filename  = "",
%%%    date      = "",
%%%    version   = "",
%%%    address   = "",
%%%    URL       = "",
%%%    email     = "",
%%%    codetable = "UTF-8",
%%%    supported = "yes|no",
%%%    docstring = "",
%%%    keywords  = "",
%%% }
%%%
%%%    Bibliography text for LaTeX inclusion
%%%    --  output encoding is UTF-8, you need to
%%%    --  convert non-ascii characters to latex control sequences
%%%    --  escape reserved latex characters
%%%    --  review according to the citation style recommendation
%%%    --  edit the above metadata
%%%
%%%    Generated using tools from http://bibtexml.sf.net/
%%%    License: http://creativecommons.org/licenses/GPL/2.0/

]]></xsl:text>
  </xsl:template>


</xsl:stylesheet>