Blame view

orcid-map.xslt 1.75 KB
b28c1b85e   Paulo Graca   Versioning source...
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
  <?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"
          xmlns:orcid="http://www.orcid.org/ns/orcid"
          version="1.0">
  <xsl:output method='text'/>
  <xsl:template match="/">
  
      <xsl:text>"</xsl:text>
      <xsl:value-of select="//orcid:orcid-identifier/orcid:path/text()"/>
      <xsl:text>",</xsl:text>
  
      <xsl:text>"</xsl:text>
      <xsl:value-of select="//orcid:orcid-bio/orcid:personal-details/orcid:given-names/text()"/>
      <xsl:text> </xsl:text>
      <xsl:value-of select="//orcid:orcid-bio/orcid:personal-details/orcid:family-name/text()"/>
      <xsl:text>",</xsl:text>
  
      <xsl:text>"</xsl:text>
      <xsl:variable name="n_ResearcherID" select="count(//orcid:external-identifier/orcid:external-id-common-name[text()='ResearcherID'])"/>
      <xsl:for-each select="//orcid:external-identifier/orcid:external-id-common-name[text()='ResearcherID']/../orcid:external-id-reference">
          <xsl:value-of select="text()"/>
          <xsl:if test="$n_ResearcherID &gt; 1 and position() != last()">
              <xsl:text>||</xsl:text>
          </xsl:if>
      </xsl:for-each>
      <xsl:text>",</xsl:text>
  
      <xsl:text>"</xsl:text>
      <xsl:variable name="n_ScopusID" select="count(//orcid:external-identifier/orcid:external-id-common-name[text()='Scopus Author ID'])"/>
      <xsl:for-each select="//orcid:external-identifier/orcid:external-id-common-name[text()='Scopus Author ID']/../orcid:external-id-reference">
          <xsl:value-of select="text()"/> 
          <xsl:if test="$n_ScopusID &gt; 1 and position() != last()">       
              <xsl:text>||</xsl:text>
          </xsl:if>
      </xsl:for-each>
      <xsl:text>"&#xa;</xsl:text>
      </xsl:template>
  
  </xsl:stylesheet>