Blame view

ingester/xslt/dc-map.xslt 3.01 KB
9d00822b4   Paulo Gra├ža   Initial commit
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
  <?xml version="1.0" encoding="utf-8"?>
  
  <xsl:stylesheet
          xmlns:xml="http://www.w3.org/XML/1998/namespace"
          xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
          version="1.0">
  <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
  <xsl:template match="/">
  <dublin_core>
      <xsl:for-each select="/crossref/titles/title">        
          <dcvalue element="title" qualifier="none"><xsl:value-of select="text()"/></dcvalue>
      </xsl:for-each>
      
      <xsl:for-each select="/crossref/issued/date">        
          <dcvalue element="date" qualifier="issued">
              <xsl:value-of select="year"/>
              <xsl:if test="month != ''">
                  <xsl:text>-</xsl:text>
                  <xsl:value-of select="month"/>
                  <xsl:if test="day != ''">
                      <xsl:text>-</xsl:text>
                      <xsl:value-of select="day"/>
                  </xsl:if>
              </xsl:if>
          </dcvalue>
      </xsl:for-each>
  
      <xsl:for-each select="/crossref/container-titles/container-title">        
          <dcvalue element="source" qualifier="none"><xsl:value-of select="text()"/></dcvalue>
      </xsl:for-each>
      <xsl:for-each select="/crossref/publisher">        
          <dcvalue element="publisher" qualifier="none"><xsl:value-of select="text()"/></dcvalue>
      </xsl:for-each>
  
      <xsl:for-each select="/crossref/authors/author">        
          <dcvalue element="contributor" qualifier="author">
              <xsl:value-of select="family"/>
              <xsl:text>, </xsl:text>
              <xsl:value-of select="given"/></dcvalue>
      </xsl:for-each>
  
      <xsl:for-each select="/crossref/DOI">        
          <dcvalue element="identifier" qualifier="none"><xsl:value-of select="text()"/></dcvalue>
      </xsl:for-each>
  
      <xsl:for-each select="/crossref/ISSNs/ISSN">        
          <dcvalue element="identifier" qualifier="issn"><xsl:value-of select="text()"/></dcvalue>
      </xsl:for-each>
  
      <xsl:for-each select="/crossref/ISBNs/ISBN">        
          <dcvalue element="identifier" qualifier="isbn"><xsl:value-of select="text()"/></dcvalue>
      </xsl:for-each>
  
      <xsl:for-each select="/crossref/type">        
          <dcvalue element="type" qualifier="none"><xsl:value-of select="text()"/></dcvalue>
      </xsl:for-each>
  
      <xsl:for-each select="/crossref/subjects/subject">        
          <dcvalue element="subject" qualifier="none"><xsl:value-of select="text()"/></dcvalue>
      </xsl:for-each>
  
      <xsl:for-each select="/crossref/editors/editor">        
          <dcvalue element="contributor" qualifier="editor"><xsl:value-of select="text()"/></dcvalue>
      </xsl:for-each>
      <xsl:for-each select="/crossref/translators/translator">        
          <dcvalue element="contributor" qualifier="other"><xsl:value-of select="text()"/></dcvalue>
      </xsl:for-each>
      <xsl:for-each select="/crossref/chairs/chair">        
          <dcvalue element="contributor" qualifier="other"><xsl:value-of select="text()"/></dcvalue>
      </xsl:for-each>
  
  </dublin_core>
  
  
      </xsl:template>
  
  </xsl:stylesheet>