Project

General

Profile

« Previous | Next » 

Revision 5718

include citation information at top of page

View differences:

eml-identifier.xsl
45 45
      <xsl:if test="normalize-space(.)">
46 46
        <tr>
47 47
          <td class="{$IDfirstColStyle}">Identifier:</td>
48
          <td class="{$IDsecondColStyle}"><xsl:value-of select="$packageID"/>
48
          <td class="{$IDsecondColStyle}">
49
          	<xsl:value-of select="$packageID"/>
49 50
          	<!-- stats loaded with ajax call -->
50 51
			<span id="stats"></span>
51 52
			<script language="JavaScript">
......
71 72
      </xsl:if>
72 73
    </xsl:template>
73 74
    
75
    <!-- for citation information -->
76
    <xsl:template name="datasetcitation">
77
        <tr>
78
        	<th>
79
        		Data Set Citation:
80
        	</th>
81
        </tr>
82
        <tr>
83
        	<td>
84
        		When using this data, please cite the data package:
85
        	</td>
86
        </tr>
87
        <tr>
88
        	<td class="citation">
89
	        	<xsl:for-each select="creator">
90
	        		<xsl:if test="position() &gt; 1">
91
	        			<xsl:if test="last() &gt; 2">, </xsl:if>
92
	        			<xsl:if test="position() = last()"> and</xsl:if>
93
	        			<xsl:text> </xsl:text>
94
	        		</xsl:if>
95
	        		<xsl:call-template name="creatorCitation" />
96
	        		<xsl:if test="position() = last()">.</xsl:if>
97
	        		<xsl:text> </xsl:text>    		
98
	        	</xsl:for-each>
99
	        	
100
	        	<xsl:value-of select="substring(string(pubDate),1,4)"/>
101
	        	<xsl:if test="substring(string(pubDate),1,4) != ''">.</xsl:if>
102
	        	
103
	        	<br/>
104
	        	<!-- title -->
105
				<b>
106
				<xsl:for-each select="./title">
107
		     		<xsl:call-template name="i18n">
108
		     			<xsl:with-param name="i18nElement" select="."/>
109
		     		</xsl:call-template>
110
		     	</xsl:for-each>				
111
				</b>
112
				<br/>
113
				<xsl:if test="boolean($registryname)">
114
					<xsl:value-of select="$registryname"/>: 
115
				</xsl:if>
116
				
117
                <span class="lsid">
118
				    <xsl:choose>
119
					    <xsl:when test="boolean($lsidauthority)">
120
						    <xsl:call-template name="lsid"/>
121
					    </xsl:when>
122
					    <xsl:otherwise>
123
						    <xsl:value-of select="../@packageId"/>
124
					    </xsl:otherwise>
125
				    </xsl:choose>
126
                </span>
127
				
128
	        	<xsl:choose>
129
	        		<xsl:when test="boolean($registryurl)">
130
	        			(<a> <xsl:attribute name="href"><xsl:value-of select="$tripleURI"/><xsl:value-of select="$docid"/></xsl:attribute> <xsl:value-of select="$registryurl"/>/metacat/<xsl:value-of select="../@packageId"/>/<xsl:value-of select="$qformat"/></a>)
131
	        		</xsl:when>
132
	        		<xsl:otherwise>
133
	        			(<a> <xsl:attribute name="href"><xsl:value-of select="$tripleURI"/><xsl:value-of select="$docid"/></xsl:attribute> <xsl:value-of select="$contextURL"/>/metacat/<xsl:value-of select="../@packageId"/>/<xsl:value-of select="$qformat"/></a>)				
134
	        		</xsl:otherwise>
135
	        	</xsl:choose>
136
				<br />
137
        </td>
138
     </tr>
139
   </xsl:template>
140
   
141
   <!--************** creates lsid dataset id **************-->
142
   <xsl:template name="lsid">
143
		<xsl:variable name="lsidString" select="concat('urn:lsid:',string($lsidauthority),':')"/>
144
		<xsl:variable name="lsidString" select="concat($lsidString, substring-before(string(../@packageId),'.'), ':')"/>
145
		<xsl:variable name="lsidString" select="concat($lsidString, substring-before(substring-after(string(../@packageId),'.'),'.'), ':')"/>
146
		<xsl:variable name="lsidString" select="concat($lsidString, substring-after(substring-after(string(../@packageId),'.'),'.'))"/>
147
		<xsl:value-of select="$lsidString"/>
148
   </xsl:template>
149
   
150
   <!--************** creates citation for a creator in "Last FM" format **************-->
151
   <xsl:template name="creatorCitation">
152
	   	<xsl:for-each select="individualName">	
153
	   		
154
	   		<xsl:value-of select="surName/text()"/>
155
	   		<xsl:text> </xsl:text>
156
	   		
157
	   		<xsl:for-each select="givenName">
158
	   			<xsl:value-of select="substring(string(.),1,1)"/>
159
	   		</xsl:for-each>
160
	   	</xsl:for-each>
161
	   	
162
	   	<xsl:if test="string(individualName/surName) != ''"> 
163
	   		<xsl:if test="string(organizationName) != ''"> of </xsl:if>
164
	   	</xsl:if>
165
	   	
166
	   	<xsl:for-each select="organizationName">
167
	   		<xsl:value-of select="."/>
168
	   	</xsl:for-each>
169
   </xsl:template>
170
    
74 171
 </xsl:stylesheet>

Also available in: Unified diff