Project

General

Profile

« Previous | Next » 

Revision 8072

handle <references> element in <creator> for the citation.

View differences:

lib/style/skins/metacatui/eml-2/eml-identifier.xsl
75 75
    		<div class="row-fluid">
76 76
    			<div class="span10">
77 77
    				<xsl:for-each select="creator">
78
		        		<xsl:if test="position() &gt; 1">
79
		        			<xsl:if test="last() &gt; 2">, </xsl:if>
80
		        			<xsl:if test="position() = last()"> and</xsl:if>
81
		        			<xsl:text> </xsl:text>
82
		        		</xsl:if>
83
		        		<xsl:call-template name="creatorCitation" />
84
		        		<xsl:if test="position() = last()">.</xsl:if>
85
		        		<xsl:text> </xsl:text>    		
78
    				
79
    					<xsl:choose>
80
							<xsl:when test="references!=''">
81
							 <xsl:variable name="ref_id" select="references"/>
82
							 <xsl:variable name="references" select="$ids[@id=$ref_id]" />
83
							 <xsl:for-each select="$references">
84
							 
85
							 	<!-- process the reference -->
86
							 	<xsl:if test="position() &gt; 1">
87
				        			<xsl:if test="last() &gt; 2">, </xsl:if>
88
				        			<xsl:if test="position() = last()"> and</xsl:if>
89
				        			<xsl:text> </xsl:text>
90
				        		</xsl:if>
91
				        		<xsl:call-template name="creatorCitation" />
92
				        		<xsl:if test="position() = last()">.</xsl:if>
93
				        		<xsl:text> </xsl:text>
94
				        		
95
							 </xsl:for-each>
96
							</xsl:when>
97
							<xsl:otherwise>
98
							
99
								<!-- just the creator element -->
100
								<xsl:if test="position() &gt; 1">
101
				        			<xsl:if test="last() &gt; 2">, </xsl:if>
102
				        			<xsl:if test="position() = last()"> and</xsl:if>
103
				        			<xsl:text> </xsl:text>
104
				        		</xsl:if>
105
				        		<xsl:call-template name="creatorCitation" />
106
				        		<xsl:if test="position() = last()">.</xsl:if>
107
				        		<xsl:text> </xsl:text>
108
				        		
109
							</xsl:otherwise>
110
						</xsl:choose>
111
		        		 		
86 112
		        	</xsl:for-each>
87 113
		        	
88 114
		        	<xsl:value-of select="substring(string(pubDate),1,4)"/>

Also available in: Unified diff