Project

General

Profile

« Previous | Next » 

Revision 5766

consolidate annotation and attribute summary into single table

View differences:

annotation-root.xsl
289 289
	
290 290
	<xsl:template name="measurementSummary">
291 291
		<!-- entity -->
292
		<xsl:for-each select="../*[local-name()='entity']">
292
		<td>
293
			<xsl:for-each select="../*[local-name()='entity']">
294
				<span>
295
					<xsl:attribute name="title">
296
						<xsl:value-of select="fn:namespace-uri-for-prefix(substring-before(./@id, ':'), .)"/>
297
						<xsl:text>#</xsl:text>
298
						<xsl:value-of select="substring-after(./@id, ':')"/>
299
					</xsl:attribute>
300
					<xsl:value-of select="substring-after(./@id, ':')"/>
301
				</span>
302
				(<xsl:value-of select="../@label"/>)
303
				<xsl:if test="position() != last()">, </xsl:if>
304
			</xsl:for-each>
305
		</td>
306
		<td>
307
			<!-- measurement -->
308
			<!-- 
309
			<xsl:value-of select="./@label" />
310
			-->
311
			<!-- characteristic -->
312
			<xsl:for-each select="./*[local-name()='characteristic']">
313
				<span>
314
					<xsl:attribute name="title">
315
						<xsl:value-of select="fn:namespace-uri-for-prefix(substring-before(./@id, ':'), .)"/>
316
						<xsl:text>#</xsl:text>
317
						<xsl:value-of select="substring-after(./@id, ':')"/>
318
					</xsl:attribute>
319
					<xsl:value-of select="substring-after(./@id, ':')"/>
320
				</span>
321
				<xsl:if test="position() != last()">, </xsl:if>
322
			</xsl:for-each>
323
		</td>
324
		<td>
325
			<!-- standard -->
293 326
			<span>
294 327
				<xsl:attribute name="title">
295
					<xsl:value-of select="fn:namespace-uri-for-prefix(substring-before(./@id, ':'), .)"/>
328
					<xsl:value-of select="fn:namespace-uri-for-prefix(substring-before(./*[local-name()='standard']/@id, ':'), .)"/>
296 329
					<xsl:text>#</xsl:text>
297
					<xsl:value-of select="substring-after(./@id, ':')"/>
298
				</xsl:attribute>
299
				<xsl:value-of select="substring-after(./@id, ':')"/>
330
					<xsl:value-of select="substring-after(./*[local-name()='standard']/@id, ':')"/>	
331
				</xsl:attribute>					
332
				<xsl:value-of select="substring-after(./*[local-name()='standard']/@id, ':')"/>
300 333
			</span>
301
			(<xsl:value-of select="../@label"/>)
302
			<xsl:if test="position() != last()">, </xsl:if>
303
		</xsl:for-each>
304
		<xsl:text> / </xsl:text>
305
		<!-- measurement -->
306
		<!-- 
307
		<xsl:value-of select="./@label" />
308
		-->
309
		<!-- characteristic -->
310
		<xsl:for-each select="./*[local-name()='characteristic']">
334
		</td>
335
		<td>							
336
			<!-- protocol -->
311 337
			<span>
312 338
				<xsl:attribute name="title">
313
					<xsl:value-of select="fn:namespace-uri-for-prefix(substring-before(./@id, ':'), .)"/>
339
					<xsl:value-of select="fn:namespace-uri-for-prefix(substring-before(./*[local-name()='protocol']/@id, ':'), .)"/>
314 340
					<xsl:text>#</xsl:text>
315
					<xsl:value-of select="substring-after(./@id, ':')"/>
316
				</xsl:attribute>
317
				<xsl:value-of select="substring-after(./@id, ':')"/>
341
					<xsl:value-of select="substring-after(./*[local-name()='protocol']/@id, ':')"/>
342
				</xsl:attribute>					
343
				<xsl:value-of select="substring-after(./*[local-name()='protocol']/@id, ':')"/>
318 344
			</span>
319
			<xsl:if test="position() != last()">, </xsl:if>
320
		</xsl:for-each>
321
		<xsl:text> / </xsl:text>
322
		<!-- standard -->
323
		<span>
324
			<xsl:attribute name="title">
325
				<xsl:value-of select="fn:namespace-uri-for-prefix(substring-before(./*[local-name()='standard']/@id, ':'), .)"/>
326
				<xsl:text>#</xsl:text>
327
				<xsl:value-of select="substring-after(./*[local-name()='standard']/@id, ':')"/>	
328
			</xsl:attribute>					
329
			<xsl:value-of select="substring-after(./*[local-name()='standard']/@id, ':')"/>
330
		</span>
331
		<xsl:text> / </xsl:text>							
332
		<!-- protocol -->
333
		<span>
334
			<xsl:attribute name="title">
335
				<xsl:value-of select="fn:namespace-uri-for-prefix(substring-before(./*[local-name()='protocol']/@id, ':'), .)"/>
336
				<xsl:text>#</xsl:text>
337
				<xsl:value-of select="substring-after(./*[local-name()='protocol']/@id, ':')"/>
338
			</xsl:attribute>					
339
			<xsl:value-of select="substring-after(./*[local-name()='protocol']/@id, ':')"/>
340
		</span>
345
		</td>	
341 346
	</xsl:template>
342 347
	
343 348
	<xsl:template name="modelSummary">
344 349
		<table class="subGroup subGroup_border onehundred_percent">
345 350
			<tr>
346
				<th colspan="2">
351
				<th colspan="5">
347 352
					Attribute Summary
353
					(<a>
354
						<xsl:attribute name="href">
355
							<xsl:value-of select="$tripleURI"/><xsl:value-of select="./@emlPackage"/>&amp;displaymodule=entity&amp;entitytype=dataTable&amp;entityindex=<xsl:value-of select="number(./@dataTable)+1"/>&amp;annotationId=<xsl:value-of select="./@id"/>
356
						</xsl:attribute>
357
						<xsl:text>Data Table: </xsl:text>
358
						<xsl:value-of select="./@dataTable"/>
359
					</a>)	
348 360
				</th>
349 361
			</tr>
350 362
			
363
			
364
			<tr>
365
				<td class="roweven" width="{$labelWidth}"></td>
366
     			<td class="rowodd">
367
     				Entity
368
     			</td>
369
     			<td class="rowodd">
370
     				Characteristic
371
     			</td>
372
     			<td class="rowodd">
373
     				Standard
374
     			</td>
375
     			<td class="rowodd">
376
     				Protocol
377
     			</td>
378
     		</tr>
379
			
351 380
			<!-- reference to the annotation parent -->
352 381
			<xsl:variable name="thisAnnotationId">
353 382
				<xsl:value-of select="./@id"/>
......
362 391
					<td class="rowodd">
363 392
						<xsl:value-of select="$attributeLabel"/>
364 393
					</td>
365
					<td>
366
						<!-- look up the attribute mapping for the given attribute -->
367
						<xsl:for-each select="key('attributes', concat($thisAnnotationId, $attributeLabel))">
368
							<table>
369
								<tr>
370
									<!-- get the <measurement> node using this label -->
371
									<xsl:for-each select="key('measurements', concat($thisAnnotationId, ./@measurement))">
372
										<td>
373
											<xsl:call-template name="measurementSummary"/>
374
										</td>	
375
									</xsl:for-each>
376
								</tr>
377
							</table>		
378
						</xsl:for-each>
379
					</td>
394
					
395
					<!-- look up the attribute mapping for the given attribute -->
396
					<xsl:for-each select="key('attributes', concat($thisAnnotationId, $attributeLabel))">
397
						<!-- get the <measurement> node using this label -->
398
						<xsl:for-each select="key('measurements', concat($thisAnnotationId, ./@measurement))">
399
							<xsl:call-template name="measurementSummary"/>
400
						</xsl:for-each>		
401
					</xsl:for-each>
402
					
380 403
				</tr>
381 404
					
382 405
			</xsl:for-each>

Also available in: Unified diff