Project

General

Profile

« Previous | Next » 

Revision 5724

handle references and original attribute names the same when loading annotation measurements for the column

View differences:

lib/style/shared/eml-2/eml-attribute.xsl
148 148
  <xsl:if test="$annotationId != ''">
149 149
	  <tr><th class="rowodd">Measurement</th>
150 150
	  <xsl:for-each select="attribute">
151
	  	<xsl:variable name="stripes">
152
	              <xsl:choose>
153
	                <xsl:when test="position() mod 2 = 1"><xsl:value-of select="$coloddStyle"/></xsl:when>
154
	                <xsl:when test="position() mod 2 = 0"><xsl:value-of select="$colevenStyle"/></xsl:when>
155
	              </xsl:choose>
156
	      </xsl:variable>
157
	    <xsl:choose>
158
	         <xsl:when test="references!=''">
159
	          <xsl:variable name="ref_id" select="references"/>
160
	          <xsl:variable name="references" select="$ids[@id=$ref_id]" />
161
	          <xsl:for-each select="$references">
162
	            <td class="{$stripes}">
163
	            	(Ref) Loading information for: <xsl:value-of select="attributeName"/>
164
	            </td>
165
	          </xsl:for-each>
166
	        </xsl:when>
167
	        <xsl:otherwise>
168
	          <td class="{$stripes}">
169
	          	<div>
170
	            		<xsl:attribute name="id">
171
	            			<xsl:value-of select="attributeName"/>
172
	            		</xsl:attribute>
173
	            		Loading information for: <xsl:value-of select="attributeName"/>
174
	            	</div>
175
	            	<script language="JavaScript">
176
            			var params = 
177
						{
178
							'action': 'read',
179
							'docid': '<xsl:value-of select="$annotationId" />',
180
							'qformat': '<xsl:value-of select="$qformat" />',
181
							'attributeLabel': '<xsl:value-of select="attributeName" />'
182
						};
183
						load(
184
							'<xsl:value-of select="$contextURL" />/metacat',
185
							params, 
186
							'<xsl:value-of select="attributeName" />');
187
					</script>
188
	          </td>
189
	        </xsl:otherwise>
190
	     </xsl:choose>
151
		<xsl:variable name="stripes">
152
			<xsl:choose>
153
				<xsl:when test="position() mod 2 = 1"><xsl:value-of select="$coloddStyle"/></xsl:when>
154
				<xsl:when test="position() mod 2 = 0"><xsl:value-of select="$colevenStyle"/></xsl:when>
155
			</xsl:choose>
156
		</xsl:variable>
157
		<td class="{$stripes}">
158
			<!-- handle references -->
159
			<xsl:variable name="finalAttributeName">
160
				<xsl:choose>
161
					<xsl:when test="references!=''">
162
						<xsl:variable name="ref_id" select="references"/>
163
						<xsl:variable name="references" select="$ids[@id=$ref_id]" />
164
						<!-- test this - should only be a single value -->
165
						<xsl:value-of select="$references/attributeName"/>
166
					</xsl:when>
167
			        <xsl:otherwise>
168
			          	<xsl:value-of select="attributeName"/>
169
					</xsl:otherwise>
170
				</xsl:choose>
171
			</xsl:variable>
172
			<!-- load annotion detail for attribute -->
173
			<div>
174
           		<xsl:attribute name="id">
175
           			<xsl:value-of select="$finalAttributeName"/>
176
           		</xsl:attribute>
177
           		Loading information for: <xsl:value-of select="$finalAttributeName"/>
178
           	</div>
179
           	<script language="JavaScript">
180
          			var params = 
181
				{
182
					'action': 'read',
183
					'docid': '<xsl:value-of select="$annotationId" />',
184
					'qformat': '<xsl:value-of select="$qformat" />',
185
					'attributeLabel': '<xsl:value-of select="$finalAttributeName" />'
186
				};
187
				load(
188
					'<xsl:value-of select="$contextURL" />/metacat',
189
					params, 
190
					'<xsl:value-of select="$finalAttributeName" />');
191
			</script>
192
		
193
		</td>
191 194
	  </xsl:for-each>
192 195
	  </tr>
193 196
	</xsl:if>

Also available in: Unified diff