2
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
3
xmlns="http://periapsis.org/tellico/"
4
xmlns:cr="http://www.crossref.org/xschema/1.0"
5
xmlns:str="http://exslt.org/strings"
6
xmlns:exsl="http://exslt.org/common"
7
exclude-result-prefixes="cr"
8
extension-element-prefixes="str exsl"
12
===================================================================
13
Tellico XSLT file - used for importing data from crossref.org
14
in the 'unixref' format.
16
See http://www.crossref.org/schema/unixref1.0.xsd
18
Copyright (C) 2008 Robby Stephenson - robby@periapsis.org
20
This XSLT stylesheet is designed to be used with the 'Tellico'
21
application, which can be found at http://www.periapsis.org/tellico/
23
===================================================================
26
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"
27
doctype-public="-//Robby Stephenson/DTD Tellico V10.0//EN"
28
doctype-system="http://periapsis.org/tellico/dtd/v10/tellico.dtd"/>
30
<!-- by default, don't output text -->
31
<xsl:template match="text()" />
33
<xsl:template match="/">
34
<tellico syntaxVersion="10">
35
<!-- always bibliography -->
36
<collection title="CrossRef Import" type="5">
38
<field name="_default"/>
39
<xsl:if test=".//cr:issn">
40
<field flags="0" title="ISSN" category="Publishing" format="4" type="1" name="issn" i18n="true"/>
43
<xsl:apply-templates select="cr:doi_records/cr:doi_record/cr:crossref"/>
48
<xsl:template match="cr:crossref">
50
<xsl:apply-templates/>
54
<xsl:template match="cr:book">
55
<entry-type>book</entry-type>
56
<xsl:apply-templates/>
59
<xsl:template match="cr:journal">
60
<entry-type>article</entry-type>
61
<xsl:apply-templates/>
64
<xsl:template match="cr:book_metadata">
66
<xsl:value-of select="cr:titles/cr:title[1]"/>
68
<xsl:apply-templates/>
71
<xsl:template match="cr:journal_article">
73
<xsl:value-of select="cr:titles/cr:title[1]"/>
75
<xsl:apply-templates/>
78
<xsl:template match="cr:isbn">
80
<xsl:value-of select="."/>
84
<xsl:template match="cr:issn">
86
<xsl:value-of select="."/>
90
<xsl:template match="cr:publisher">
92
<xsl:value-of select="cr:publisher_name"/>
95
<xsl:value-of select="cr:publisher_place"/>
99
<xsl:template match="cr:journal_metadata">
101
<xsl:value-of select="cr:full_title"/>
103
<xsl:apply-templates/>
106
<xsl:template match="cr:edition">
108
<xsl:value-of select="."/>
112
<xsl:template match="cr:volume">
114
<xsl:value-of select="."/>
118
<xsl:template match="cr:issue">
120
<xsl:value-of select="."/>
124
<xsl:template match="cr:series_metadata">
126
<xsl:value-of select="cr:titles/cr:title[1]"/>
130
<xsl:template match="cr:doi_data">
132
<xsl:value-of select="cr:doi"/>
135
<xsl:value-of select="cr:resource"/>
139
<xsl:template match="cr:publication_date">
141
<xsl:value-of select="cr:year"/>
144
<xsl:value-of select="cr:month"/>
148
<xsl:template match="cr:pages">
150
<xsl:value-of select="concat(cr:first_page,'-',cr:last_page)"/>
154
<xsl:template match="cr:contributors">
156
<xsl:for-each select="cr:person_name[@contributor_role='author']">
158
<xsl:value-of select="concat(cr:given_name,' ',cr:surname)"/>
163
<xsl:for-each select="cr:person_name[@contributor_role='editor']">
165
<xsl:value-of select="concat(cr:given_name,' ',cr:surname)"/>
170
<xsl:value-of select="cr:organization[1]"/>