43 |
43 |
<xsl:param name="tripleURI"><xsl:value-of select="$contextURL" /><![CDATA[/metacat?action=read&qformat=]]><xsl:value-of select="$qformat" /><![CDATA[&sessionid=]]><xsl:value-of select="$sessionid" /><![CDATA[&docid=]]></xsl:param>
|
44 |
44 |
|
45 |
45 |
<xsl:key name="mapping" match="//*[local-name()='map']" use="@measurement" />
|
|
46 |
<xsl:key name="attributes" match="//*[local-name()='map']" use="@attribute" />
|
|
47 |
<xsl:key name="measurements" match="//*[local-name()='measurement']" use="@label" />
|
46 |
48 |
|
47 |
49 |
<xsl:template name="annotation">
|
48 |
50 |
<xsl:param name="showAll">true</xsl:param>
|
49 |
|
|
50 |
51 |
<table align="center" border="0" cellpadding="0" cellspacing="0" width="100%" class="subGroup">
|
51 |
52 |
<tr>
|
52 |
53 |
<td>
|
... | ... | |
125 |
126 |
<xsl:if test="$showAll='true'">
|
126 |
127 |
<xsl:for-each select="./*[local-name()='observation']">
|
127 |
128 |
<tr>
|
128 |
|
<td class="text_plain" colspan="2">
|
|
129 |
<td class="text_plain">
|
129 |
130 |
<table class="subGroup subGroup_border">
|
130 |
131 |
<tr>
|
131 |
132 |
<th>
|
132 |
|
<xsl:attribute name="colspan">
|
133 |
|
<xsl:value-of select="count(./*[local-name()='measurement'])"/>
|
134 |
|
</xsl:attribute>
|
135 |
133 |
Observation
|
136 |
134 |
</th>
|
137 |
135 |
</tr>
|
138 |
136 |
<tr valign="top">
|
139 |
|
|
140 |
137 |
<!-- observation entity -->
|
141 |
138 |
<td>
|
142 |
|
<xsl:attribute name="colspan">
|
143 |
|
<xsl:value-of select="count(./*[local-name()='measurement'])"/>
|
144 |
|
</xsl:attribute>
|
145 |
139 |
<table>
|
146 |
140 |
<tr>
|
147 |
141 |
<td class="rowodd">
|
... | ... | |
179 |
173 |
</table>
|
180 |
174 |
</td>
|
181 |
175 |
</tr>
|
182 |
|
<tr>
|
183 |
|
<!-- measurement -->
|
184 |
|
<xsl:for-each select="./*[local-name()='measurement']">
|
185 |
|
<td class="text_plain">
|
186 |
|
<table class="subGroup subGroup_border">
|
187 |
|
<tr>
|
188 |
|
<th colspan="3">
|
189 |
|
Measurement (<xsl:value-of select="./@label" />)
|
190 |
|
</th>
|
191 |
|
</tr>
|
192 |
|
<tr>
|
193 |
|
<td class="rowodd">
|
194 |
|
Column:
|
195 |
|
</td>
|
196 |
|
<td class="roweven">
|
197 |
|
<xsl:for-each select="key('mapping', @label)">
|
198 |
|
<xsl:value-of select="./@attribute" />
|
199 |
|
</xsl:for-each>
|
200 |
|
</td>
|
201 |
|
<td class="roweven"></td>
|
202 |
|
</tr>
|
203 |
|
<tr>
|
204 |
|
<td class="rowodd">
|
205 |
|
Characteristic[s]:
|
206 |
|
</td>
|
207 |
|
<td class="roweven">
|
208 |
|
<xsl:for-each select="./*[local-name()='characteristic']">
|
209 |
|
<p>
|
210 |
|
<xsl:attribute name="title">
|
211 |
|
<xsl:value-of select="fn:namespace-uri-for-prefix(substring-before(./@id, ':'), .)"/>
|
212 |
|
<xsl:text>#</xsl:text>
|
213 |
|
<xsl:value-of select="substring-after(./@id, ':')"/>
|
214 |
|
</xsl:attribute>
|
215 |
|
<xsl:value-of select="substring-after(./@id, ':')"/>
|
216 |
|
</p>
|
217 |
|
</xsl:for-each>
|
218 |
|
</td>
|
219 |
|
<!--
|
220 |
|
<td class="roweven">
|
221 |
|
<xsl:for-each select="./*[local-name()='characteristic']">
|
222 |
|
<xsl:value-of select="fn:namespace-uri-for-prefix(substring-before(./@id, ':'), .)"/>
|
223 |
|
</xsl:for-each>
|
224 |
|
</td>
|
225 |
|
-->
|
226 |
|
</tr>
|
227 |
|
<tr>
|
228 |
|
<td class="rowodd">
|
229 |
|
Standard:
|
230 |
|
</td>
|
231 |
|
<td class="roweven">
|
232 |
|
<p>
|
233 |
|
<xsl:attribute name="title">
|
234 |
|
<xsl:value-of select="fn:namespace-uri-for-prefix(substring-before(./*[local-name()='standard']/@id, ':'), .)"/>
|
235 |
|
<xsl:text>#</xsl:text>
|
236 |
|
<xsl:value-of select="substring-after(./*[local-name()='standard']/@id, ':')"/>
|
237 |
|
</xsl:attribute>
|
238 |
|
<xsl:value-of select="substring-after(./*[local-name()='standard']/@id, ':')"/>
|
239 |
|
</p>
|
240 |
|
</td>
|
241 |
|
<!--
|
242 |
|
<td class="roweven">
|
243 |
|
<xsl:value-of select="fn:namespace-uri-for-prefix(substring-before(./*[local-name()='standard']/@id, ':'), .)"/>
|
244 |
|
</td>
|
245 |
|
-->
|
246 |
|
</tr>
|
247 |
|
<tr>
|
248 |
|
<td class="rowodd">
|
249 |
|
Protocol:
|
250 |
|
</td>
|
251 |
|
<td class="roweven">
|
252 |
|
<p>
|
253 |
|
<xsl:attribute name="title">
|
254 |
|
<xsl:value-of select="fn:namespace-uri-for-prefix(substring-before(./*[local-name()='protocol']/@id, ':'), .)"/>
|
255 |
|
<xsl:text>#</xsl:text>
|
256 |
|
<xsl:value-of select="substring-after(./*[local-name()='protocol']/@id, ':')"/>
|
257 |
|
</xsl:attribute>
|
258 |
|
<xsl:value-of select="substring-after(./*[local-name()='protocol']/@id, ':')"/>
|
259 |
|
</p>
|
260 |
|
</td>
|
261 |
|
<!--
|
262 |
|
<td class="roweven">
|
263 |
|
<xsl:value-of select="fn:namespace-uri-for-prefix(substring-before(./*[local-name()='protocol']/@id, ':'), .)"/>
|
264 |
|
</td>
|
265 |
|
-->
|
266 |
|
</tr>
|
267 |
|
</table>
|
268 |
|
</td>
|
269 |
|
</xsl:for-each> <!-- measurement -->
|
|
176 |
<tr>
|
|
177 |
<td>
|
|
178 |
<table>
|
|
179 |
<tr>
|
|
180 |
<!-- measurement -->
|
|
181 |
<xsl:for-each select="./*[local-name()='measurement']">
|
|
182 |
<xsl:call-template name="measurement" />
|
|
183 |
</xsl:for-each>
|
|
184 |
<!-- measurement -->
|
|
185 |
</tr>
|
|
186 |
</table>
|
|
187 |
</td>
|
270 |
188 |
</tr>
|
271 |
189 |
</table>
|
272 |
190 |
</td>
|
... | ... | |
275 |
193 |
</xsl:if>
|
276 |
194 |
|
277 |
195 |
<tr class="searchresultsdivider">
|
278 |
|
<td colspan="5">
|
279 |
|
</td>
|
|
196 |
<td></td>
|
280 |
197 |
</tr>
|
281 |
|
|
282 |
|
</table>
|
|
198 |
</table>
|
283 |
199 |
|
284 |
200 |
</xsl:template>
|
|
201 |
|
|
202 |
<xsl:template name="measurement">
|
|
203 |
<!-- measurement -->
|
|
204 |
<td class="text_plain">
|
|
205 |
<table class="subGroup subGroup_border">
|
|
206 |
<tr>
|
|
207 |
<th colspan="3">
|
|
208 |
Measurement (<xsl:value-of select="./@label" />)
|
|
209 |
</th>
|
|
210 |
</tr>
|
|
211 |
<tr>
|
|
212 |
<td class="rowodd">
|
|
213 |
Column:
|
|
214 |
</td>
|
|
215 |
<td class="roweven">
|
|
216 |
<xsl:for-each select="key('mapping', @label)">
|
|
217 |
<xsl:value-of select="./@attribute" />
|
|
218 |
</xsl:for-each>
|
|
219 |
</td>
|
|
220 |
<td class="roweven"></td>
|
|
221 |
</tr>
|
|
222 |
<tr>
|
|
223 |
<td class="rowodd">
|
|
224 |
Characteristic[s]:
|
|
225 |
</td>
|
|
226 |
<td class="roweven">
|
|
227 |
<xsl:for-each select="./*[local-name()='characteristic']">
|
|
228 |
<p>
|
|
229 |
<xsl:attribute name="title">
|
|
230 |
<xsl:value-of select="fn:namespace-uri-for-prefix(substring-before(./@id, ':'), .)"/>
|
|
231 |
<xsl:text>#</xsl:text>
|
|
232 |
<xsl:value-of select="substring-after(./@id, ':')"/>
|
|
233 |
</xsl:attribute>
|
|
234 |
<xsl:value-of select="substring-after(./@id, ':')"/>
|
|
235 |
</p>
|
|
236 |
</xsl:for-each>
|
|
237 |
</td>
|
|
238 |
</tr>
|
|
239 |
<tr>
|
|
240 |
<td class="rowodd">
|
|
241 |
Standard:
|
|
242 |
</td>
|
|
243 |
<td class="roweven">
|
|
244 |
<p>
|
|
245 |
<xsl:attribute name="title">
|
|
246 |
<xsl:value-of select="fn:namespace-uri-for-prefix(substring-before(./*[local-name()='standard']/@id, ':'), .)"/>
|
|
247 |
<xsl:text>#</xsl:text>
|
|
248 |
<xsl:value-of select="substring-after(./*[local-name()='standard']/@id, ':')"/>
|
|
249 |
</xsl:attribute>
|
|
250 |
<xsl:value-of select="substring-after(./*[local-name()='standard']/@id, ':')"/>
|
|
251 |
</p>
|
|
252 |
</td>
|
|
253 |
</tr>
|
|
254 |
<tr>
|
|
255 |
<td class="rowodd">
|
|
256 |
Protocol:
|
|
257 |
</td>
|
|
258 |
<td class="roweven">
|
|
259 |
<p>
|
|
260 |
<xsl:attribute name="title">
|
|
261 |
<xsl:value-of select="fn:namespace-uri-for-prefix(substring-before(./*[local-name()='protocol']/@id, ':'), .)"/>
|
|
262 |
<xsl:text>#</xsl:text>
|
|
263 |
<xsl:value-of select="substring-after(./*[local-name()='protocol']/@id, ':')"/>
|
|
264 |
</xsl:attribute>
|
|
265 |
<xsl:value-of select="substring-after(./*[local-name()='protocol']/@id, ':')"/>
|
|
266 |
</p>
|
|
267 |
</td>
|
|
268 |
</tr>
|
|
269 |
</table>
|
|
270 |
</td>
|
|
271 |
|
|
272 |
</xsl:template>
|
|
273 |
|
|
274 |
<xsl:template name="attributeDetail">
|
|
275 |
<xsl:param name="attributeLabel"/>
|
|
276 |
<!-- look up the attribute mapping for the given label -->
|
|
277 |
<xsl:for-each select="key('attributes', $attributeLabel)">
|
|
278 |
<!-- get the <measurement> node using this label -->
|
|
279 |
<table class="subGroup subGroup_border">
|
|
280 |
<tr>
|
|
281 |
<xsl:for-each select="key('measurements', ./@measurement)">
|
|
282 |
<xsl:call-template name="measurement"/>
|
|
283 |
</xsl:for-each>
|
|
284 |
</tr>
|
|
285 |
</table>
|
|
286 |
</xsl:for-each>
|
|
287 |
</xsl:template>
|
285 |
288 |
|
286 |
289 |
</xsl:stylesheet>
|
include template for rendering a single attribute