/usr/share/tellico/dblp2tellico.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 | <?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns="http://periapsis.org/tellico/"
xmlns:exsl="http://exslt.org/common"
extension-element-prefixes="exsl"
version="1.0">
<!--
===================================================================
Tellico XSLT file - used for importing data from dblp.org
Copyright (C) 2012 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
===================================================================
-->
<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="DBLP Import" type="5">
<fields>
<field name="_default"/>
</fields>
<xsl:apply-templates select="result/hits/hit/info"/>
</collection>
</tellico>
</xsl:template>
<xsl:template match="info">
<xsl:variable name="type">
<xsl:choose>
<xsl:when test="type='Journal Articles'">
<xsl:text>article</xsl:text>
</xsl:when>
<xsl:when test="type='Conference and Workshop Papers'">
<xsl:text>inproceedings</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="type"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<entry>
<title>
<xsl:value-of select="title"/>
</title>
<xsl:if test="$type='inproceedings'">
<booktitle>
<xsl:value-of select="(booktitle|venue)[1]"/>
</booktitle>
</xsl:if>
<entry-type>
<xsl:value-of select="$type"/>
</entry-type>
<year>
<xsl:value-of select="year"/>
</year>
<pages>
<xsl:value-of select="pages"/>
</pages>
<xsl:if test="$type='article'">
<journal>
<xsl:value-of select="(journal|venue)[1]"/>
</journal>
</xsl:if>
<volume>
<xsl:value-of select="volume"/>
</volume>
<number>
<xsl:value-of select="number"/>
</number>
<publishers>
<publisher>
<xsl:value-of select="publisher"/>
</publisher>
</publishers>
<url>
<xsl:value-of select="url"/>
</url>
<authors>
<xsl:for-each select="authors/author">
<author>
<xsl:value-of select="."/>
</author>
</xsl:for-each>
</authors>
<bibtex-key>
<xsl:call-template name="substring-after-last">
<xsl:with-param name="input" select="url"/>
<xsl:with-param name="substr" select="'/'"/>
</xsl:call-template>
</bibtex-key>
<!-- just assume DOI starts with 10. -->
<xsl:variable name="doi" select="substring-after(title/@ee, '/10.')"/>
<doi>
<xsl:if test="$doi">
<xsl:text>10.</xsl:text>
<xsl:value-of select="$doi"/>
</xsl:if>
</doi>
</entry>
</xsl:template>
<xsl:template name="substring-after-last">
<xsl:param name="input"/>
<xsl:param name="substr"/>
<xsl:variable name="temp" select="substring-after($input, $substr)"/>
<xsl:choose>
<xsl:when test="$substr and contains($temp, $substr)">
<xsl:call-template name="substring-after-last">
<xsl:with-param name="input" select="$temp"/>
<xsl:with-param name="substr" select="$substr"/>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$temp"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
</xsl:stylesheet>
|