Project

General

Profile

« Previous | Next » 

Revision 5727

include annotation id in the xsl:key so that attribute-measurement mappings can be made for each annotation without confusing them across annotations.

View differences:

lib/style/skins/semtools/annotation.xsl
83 83
							</div>
84 84
		
85 85
							<xsl:for-each select="/*[local-name()='annotation']">
86
								<xsl:call-template name="annotation"/>
86
								<xsl:call-template name="annotation">
87
									<xsl:with-param name="showAll" select="'true'"/>
88
								</xsl:call-template>
87 89
							</xsl:for-each>
88 90
							
89 91
							
lib/style/skins/semtools/resultset.xsl
134 134
					<table class="onehundred_percent">
135 135
					
136 136
						<tr>
137
							<td colspan="3">
137
							<td colspan="2">
138 138
								Citation:
139 139
								<xsl:text> </xsl:text>
140 140
								<a>
......
147 147
						</tr>
148 148
						
149 149
						<tr>
150
							<!-- EML metadata -->
151
							<td>
152
								<!-- render the DP details -->
153
								<table class="subGroup subGroup_border onehundred_percent">
154
									<tr>
155
										<th>
156
											Owner[s]
157
										</th>
158
										<th>
159
											Organizations[s]
160
										</th>
161
										<th>
162
											Keyword[s]
163
										</th>
164
									</tr>
165
									<tr>
166
										<td>
167
											<xsl:for-each
168
												select="./param[@name='creator/individualName/surName']">
169
												<xsl:value-of select="." />
170
												<br/>
171
											</xsl:for-each>
172
										</td>
173
										<td>
174
											<xsl:for-each
175
												select="./param[@name='creator/organizationName']">
176
												<xsl:value-of select="." />
177
												<br/>
178
											</xsl:for-each>
179
										</td>
180
										<td>
181
											<xsl:for-each
182
												select="./param[@name='keyword']">
183
												<xsl:value-of select="." />
184
												<br/>
185
											</xsl:for-each>
186
										</td>
187
									</tr>			
188
								</table>
189
							</td>
190
							
150
						
191 151
							<!-- annotation section -->
192
							<td width="30%">
152
							<td width="50%">
193 153
								<!-- render the annotation -->
194 154
								<xsl:for-each select="./*[local-name()='annotation']">
195 155
									<xsl:call-template name="annotation">
196
										 <xsl:with-param name="showAll" select="false"/>
156
										 <xsl:with-param name="showAll" select="'true'"/>
197 157
									</xsl:call-template>	
198 158
								</xsl:for-each>
199 159
							</td>
200 160
							
161
							<!-- EML section -->
162
							<td>
163
								<xsl:call-template name="emlDetails"/>
164
							</td>
165
							
201 166
						</tr>
167
						
202 168
					</table>
203 169
											
204 170
				</div>
......
209 175
			
210 176
	</xsl:template>
211 177
	
178
	<xsl:template name="emlDetails">
179
		<!-- render the DP details -->
180
		<table class="subGroup subGroup_border onehundred_percent">
181
			<tr>
182
				<th>
183
					Owner[s]
184
				</th>
185
				<th>
186
					Organizations[s]
187
				</th>
188
				<th>
189
					Keyword[s]
190
				</th>
191
			</tr>
192
			<tr>
193
				<td>
194
					<xsl:for-each
195
						select="./param[@name='creator/individualName/surName']">
196
						<xsl:value-of select="." />
197
						<br/>
198
					</xsl:for-each>
199
				</td>
200
				<td>
201
					<xsl:for-each
202
						select="./param[@name='creator/organizationName']">
203
						<xsl:value-of select="." />
204
						<br/>
205
					</xsl:for-each>
206
				</td>
207
				<td>
208
					<xsl:for-each
209
						select="./param[@name='keyword']">
210
						<xsl:value-of select="." />
211
						<br/>
212
					</xsl:for-each>
213
				</td>
214
			</tr>			
215
		</table>
216
	</xsl:template>
217
	
212 218

  
213 219
</xsl:stylesheet>
lib/style/skins/semtools/annotation-root.xsl
42 42
	
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
	<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" />
45
	<xsl:key name="mapping" match="//*[local-name()='map']" use="concat(../@id, @measurement)" />
46
	<xsl:key name="attributes" match="//*[local-name()='map']" use="concat(../@id, @attribute)" />
47
	<xsl:key name="measurements" match="//*[local-name()='measurement']" use="concat(../../@id, @label)" />
48 48
	
49 49
	<xsl:template name="annotation">
50 50
		<xsl:param name="showAll">true</xsl:param>
......
212 212
					<td class="rowodd">					
213 213
						Column:
214 214
					</td>
215
					<td class="roweven">					
216
						<xsl:for-each select="key('mapping', @label)">
215
					<td class="roweven">
216
						<xsl:variable name="columnkey">
217
							<xsl:value-of select="concat(../../@id, @label)" />
218
						</xsl:variable>
219
						<xsl:for-each select="key('mapping', $columnkey )">
217 220
							<xsl:value-of select="./@attribute" />
218 221
						</xsl:for-each>
219 222
					</td>
......
274 277
	<xsl:template name="attributeDetail">
275 278
		<xsl:param name="attributeLabel"/>
276 279
		<!-- look up the attribute mapping for the given label -->
277
		<xsl:for-each select="key('attributes', $attributeLabel)">
280
		<xsl:for-each select="key('attributes', concat(//*[local-name()='annotation']/@id, $attributeLabel))">
278 281
			<!-- get the <measurement> node using this label -->
279 282
			<table>
280 283
				<tr>
281
					<xsl:for-each select="key('measurements', ./@measurement)">
284
					<xsl:for-each select="key('measurements', concat(//*[local-name()='annotation']/@id, ./@measurement))">
282 285
						<xsl:call-template name="measurement"/>
283 286
					</xsl:for-each>
284 287
				</tr>

Also available in: Unified diff