This file is indexed.

/usr/share/tellico/pubmed2tellico.xsl is in tellico-data 3.1.2-0.1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  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
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                xmlns="http://periapsis.org/tellico/"
                xmlns:m="uri:months"
                version="1.0">

<!--
   ===================================================================
   Tellico XSLT file - used for importing PubMed data.

   Copyright (C) 2005 Michaƫl Zugaro <michael.zugaro@college-de-france.fr>
                  2005-2009 Robby Stephenson <robby@periapsis.org>

   This XSLT stylesheet is designed to be used with the 'Tellico'
   application, which can be found at http://tellico-project.org

   ===================================================================
-->

<!-- lookup table for months -->
<m:months>
 <m:month id="Jan">1</m:month>
 <m:month id="Feb">2</m:month>
 <m:month id="Mar">3</m:month>
 <m:month id="Apr">4</m:month>
 <m:month id="May">5</m:month>
 <m:month id="Jun">6</m:month>
 <m:month id="Jul">7</m:month>
 <m:month id="Aug">8</m:month>
 <m:month id="Sep">9</m:month>
 <m:month id="Oct">10</m:month>
 <m:month id="Nov">11</m:month>
 <m:month id="Dec">12</m:month>
 <!-- months in other languages could be added easily -->
</m:months>
<xsl:key name="months" match="m:month" use="@id"/>
<xsl:variable name="months-top" select="document('')/*/m:months"/>

<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"
            doctype-public="-//Robby Stephenson/DTD Tellico V11.0//EN"
            doctype-system="http://periapsis.org/tellico/dtd/v11/tellico.dtd"/>

<xsl:template match="/">
 <tellico syntaxVersion="11">
  <collection title="PubMed Import" type="5">
   <fields>
    <field name="_default"/>
    <field flags="0" title="Institution" category="Institution" format="4" type="2" name="institution" i18n="true">
     <prop name="bibtex">institution</prop>
    </field>
    <field flags="0" title="Pubmed" category="Publishing" format="4" type="1" name="pmid" description="Pubmed" i18n="true" />
   </fields>
   <xsl:apply-templates select="/PubmedArticleSet/PubmedArticle"/>
  </collection>
 </tellico>
</xsl:template>

<xsl:template match="PubmedArticle">
 <entry>
  <xsl:apply-templates select="MedlineCitation"/>
  <xsl:apply-templates select="PubmedData"/>
 </entry>
</xsl:template>

<xsl:template match="MedlineCitation">
  <entry-type>
   <xsl:text>article</xsl:text>
  </entry-type>

  <volume>
   <xsl:value-of select="Article/Journal/JournalIssue/Volume"/>
  </volume>

  <number>
   <xsl:value-of select="Article/Journal/JournalIssue/Issue"/>
  </number>

  <xsl:variable name="year">
   <xsl:variable name="year1" select="Article/Journal/JournalIssue/PubDate/Year"/>
   <xsl:variable name="year2" select="Article/Journal/JournalIssue/PubDate/MedlineDate"/>
   <xsl:choose>
    <xsl:when test="string-length($year1) != 0">
     <xsl:value-of select="$year1"/>
    </xsl:when>
    <xsl:otherwise>
     <xsl:value-of select="substring($year2,1,4)"/>
    </xsl:otherwise>
   </xsl:choose>
  </xsl:variable>

  <year>
   <xsl:value-of select="$year"/>
  </year>

  <month>
   <xsl:apply-templates select="$months-top">
    <xsl:with-param name="month-id" select="Article/Journal/JournalIssue/PubDate/Month"/>
   </xsl:apply-templates>
  </month>

  <title>
   <xsl:value-of select="Article/ArticleTitle"/>
  </title>

  <pages>
   <xsl:value-of select="Article/Pagination/MedlinePgn"/>
  </pages>

  <abstract>
   <xsl:value-of select="Article/Abstract/AbstractText"/>
  </abstract>

  <institution>
   <xsl:value-of select="Article/Affiliation"/>
  </institution>

  <authors>
   <xsl:for-each select="Article/AuthorList/Author">
    <author>
     <xsl:choose>
      <xsl:when test="ForeName">
       <xsl:value-of select="concat(ForeName, ' ')"/>
      </xsl:when>
      <xsl:when test="FirstName">
       <xsl:value-of select="concat(FirstName, ' ')"/>
      </xsl:when>
      <xsl:otherwise>
       <xsl:call-template name="TransformInitials">
        <xsl:with-param name="initials" select="Initials"/>
       </xsl:call-template>
      </xsl:otherwise>
     </xsl:choose>
     <xsl:value-of select="LastName"/>
    </author>
   </xsl:for-each>
  </authors>

  <journal>
   <xsl:if test="Article/Journal/Title">
    <xsl:value-of select="Article/Journal/Title"/>
   </xsl:if>
   <xsl:if test="not(Article/Journal/Title)">
    <xsl:value-of select="MedlineJournalInfo/MedlineTA"/>
   </xsl:if>
  </journal>

  <keywords>
   <xsl:for-each select="MeshHeadingList/MeshHeading/QualifierName[@MajorTopicYN='Y'] | MeshHeadingList/MeshHeading/DescriptorName">
    <keyword>
     <xsl:value-of select="."/>
    </keyword>
   </xsl:for-each>
  </keywords>

  <pmid>
   <xsl:value-of select="PMID"/>
  </pmid>

</xsl:template>

<xsl:template match="PubmedData">
 <doi>
  <xsl:value-of select="ArticleIdList/ArticleId[@IdType='doi']"/>
 </doi>
</xsl:template>

<xsl:template name="TransformInitials">
 <xsl:param name="initials"/>
 <xsl:variable name="n" select="string-length($initials)"/>
 <xsl:if test="$n &gt;= 1">
  <xsl:value-of select="substring($initials,1,1)"/>
  <xsl:text>. </xsl:text>
  <xsl:call-template name="TransformInitials">
   <xsl:with-param name="initials" select="substring($initials,2,$n - 1)"/>
  </xsl:call-template>
 </xsl:if>
</xsl:template>

<xsl:template match="m:months">
 <xsl:param name="month-id"/>
 <xsl:variable name="m" select="key('months', $month-id)"/>
 <xsl:if test="$m">
  <xsl:value-of select="$m"/>
 </xsl:if>
 <xsl:if test="not($m)">
  <xsl:value-of select="$month-id"/>
 </xsl:if>
</xsl:template>

</xsl:stylesheet>