- Timestamp:
- 08/20/13 11:29:47 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
SMC/trunk/SMC/src/xsl/smc2stats_datasets.xsl
r2482 r3436 4 4 xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 5 5 xmlns:xs="http://www.w3.org/2001/XMLSchema" 6 7 exclude-result-prefixes="xs" 6 xmlns:ds="http://aac.ac.at/corpus_shell/dataset" 7 xmlns:my="myFunctions" 8 exclude-result-prefixes="xs my" 8 9 9 10 > … … 25 26 <xsl:import href="smc_commons.xsl"/> 26 27 27 <xsl:output method=" html" indent="yes" />28 <xsl:output method="xml" indent="yes" /> 28 29 29 30 <xsl:param name="title" select="'SMC Stats'" /> … … 42 43 43 44 <xsl:variable name="all_profiles" select="$cmd-terms//Termset" /> 45 <xsl:variable name="all_datcats" select="$dcr-terms//Concept" /> 44 46 45 47 <!--<xsl:template name="continue-root">--> … … 50 52 <xsl:call-template name="summary-components"></xsl:call-template> 51 53 <xsl:call-template name="summary-datcats"></xsl:call-template> 54 <xsl:call-template name="ambigue-terms"></xsl:call-template> 52 55 </multiresult> 53 56 <!-- <xsl:call-template name="summary-concepts"></xsl:call-template> … … 61 64 <xsl:template name="summary-overall"> 62 65 63 <dataset key="summary" label="Summary"> 64 <labels> 65 <label key="creation-date">created</label> 66 <label key="count-terms">all Terms</label> 67 <label key="profiles">Profiles</label> 68 <label key="components">Components</label> 69 <label key="distinct-components">distinct Components</label> 70 <label key="elements">Elements</label> 71 <label key="distinct-elements">distinct Elements</label> 66 <ds:dataset key="summary" label="Summary"> 67 <ds:labels> 68 <ds:label key="creation-date">created</ds:label> 69 <ds:label key="profiles">Profiles</ds:label> 70 <ds:label key="components">Components</ds:label> 71 <ds:label key="distinct-components">distinct Components</ds:label> 72 <ds:label key="elements">Elements</ds:label> 73 <ds:label key="distinct-elements">distinct Elements</ds:label> 72 74 73 <label key="distinct-datcats">distinct DatCats</label> 74 <label key="elems-with-datcats">Elements with DatCats</label> 75 <label key="elems-without-datcats">Elements without DatCats</label> 76 <label key="elems-without-datcats-ratio" >ratio of elements without DatCats</label> 77 <label key="available-concepts">available Concepts</label> 78 <label key="used-concepts">used Concept</label> 79 <label key="blind-concepts">blind Concepts (not in public ISOcat)</label> 80 <label key="unused-concepts">unused Concepts</label> 81 </labels> 82 <dataseries key="overall" label="Overall"> 83 <value key="creation-date"><xsl:value-of select="current-date()"/></value> 84 <value key="count-terms" ><xsl:value-of select="count($dcr-cmd-map//Term)"/></value> 85 <value key="profiles"><xsl:value-of select="count($cmd-terms//Termset)"/></value> 86 <value key="components"><xsl:value-of select="count($cmd-terms//Term[@type='CMD_Component'])"/></value> 87 <value key="distinct-components"><xsl:value-of select="$count_distinct_components"/></value> 88 <value key="elements"><xsl:value-of select="$count_elems"/></value> 89 <value key="distinct-elements"><xsl:value-of select="$count_distinct_elems"/></value> 90 <value key="elems-with-datcats"><xsl:value-of select="count(distinct-values($cmd-terms//Term[@type='CMD_Element'][@datcat[not(.='')]]/@id))"/></value> 91 <value key="elems-without-datcats"><xsl:value-of select="count(distinct-values($cmd-terms//Term[@type='CMD_Element'][@datcat='']/@id))"/></value> 75 <ds:label key="distinct-datcats">distinct DatCats</ds:label> 76 <ds:label key="elems-with-datcats">Elements with DatCats</ds:label> 77 <ds:label key="elems-without-datcats">Elements without DatCats</ds:label> 78 <ds:label key="elems-without-datcats-ratio" >ratio of elements without DatCats</ds:label> 79 <ds:label key="available-concepts">available Concepts</ds:label> 80 <ds:label key="used-concepts">used Concept</ds:label> 81 <ds:label key="blind-concepts">blind Concepts (not in public ISOcat)</ds:label> 82 <ds:label key="unused-concepts">Concepts not used in CMD</ds:label> 83 </ds:labels> 84 <ds:dataseries key="overall" label="Overall"> 85 <ds:value key="creation-date"><xsl:value-of select="current-date()"/></ds:value> 86 <ds:value key="profiles"><xsl:value-of select="count($cmd-terms//Termset)"/></ds:value> 87 <ds:value key="components"><xsl:value-of select="count($cmd-terms//Term[@type='CMD_Component'])"/></ds:value> 88 <ds:value key="distinct-components"><xsl:value-of select="$count_distinct_components"/></ds:value> 89 <ds:value key="elements"><xsl:value-of select="$count_elems"/></ds:value> 90 <ds:value key="distinct-elements"><xsl:value-of select="$count_distinct_elems"/></ds:value> 91 <ds:value key="elems-with-datcats"><xsl:value-of select="count(distinct-values($cmd-terms//Term[@type='CMD_Element'][@datcat[not(.='')]]/@id))"/></ds:value> 92 <ds:value key="elems-without-datcats"><xsl:value-of select="count(distinct-values($cmd-terms//Term[@type='CMD_Element'][@datcat='']/@id))"/></ds:value> 92 93 <!--<xsl:variable name="elems-without-datcats-ratio" select="count($cmd-terms//Term[@type='CMD_Element'][@datcat='']) div $count_elems"></xsl:variable> 93 < value key="elems-without-datcats-ratio" formatted="{format-number($elems-without-datcats-ratio, '0.00 %')}">94 <xsl:value-of select="$elems-without-datcats-ratio"/></ value>-->94 <ds:value key="elems-without-datcats-ratio" formatted="{format-number($elems-without-datcats-ratio, '0.00 %')}"> 95 <xsl:value-of select="$elems-without-datcats-ratio"/></ds:value>--> 95 96 <xsl:variable name="elems-distinct-without-datcats-ratio" select="count(distinct-values($cmd-terms//Term[@type='CMD_Element'][@datcat='']/@id)) div $count_distinct_elems"></xsl:variable> 96 < value key="elems-without-datcats-ratio" formatted="{format-number($elems-distinct-without-datcats-ratio, '0.00 %')}">97 <xsl:value-of select="$elems-distinct-without-datcats-ratio"/></ value>98 < value key="distinct-datcats"><xsl:value-of select="$count_distinct_datcats"/></value>99 < value key="used-concepts"><xsl:value-of select="count($dcr-cmd-map//Concept)"/></value>100 < value key="blind-concepts"><xsl:value-of select="count(//Concept[not(Term[@set='isocat'])])"/></value>101 < value key="available-concepts"><xsl:value-of select="count($dcr-terms//Concept)"/></value>102 < value key="unused-concepts"><xsl:value-of select="count($dcr-terms//Concept except $dcr-terms//Concept[@id=$dcr-cmd-map//Concept/@id])"/></value>103 </d ataseries>104 105 </d ataset>97 <ds:value key="elems-without-datcats-ratio" formatted="{format-number($elems-distinct-without-datcats-ratio, '0.00 %')}"> 98 <xsl:value-of select="$elems-distinct-without-datcats-ratio"/></ds:value> 99 <ds:value key="distinct-datcats"><xsl:value-of select="$count_distinct_datcats"/></ds:value> 100 <ds:value key="used-concepts"><xsl:value-of select="count($dcr-cmd-map//Concept)"/></ds:value> 101 <ds:value key="blind-concepts"><xsl:value-of select="count(//Concept[not(Term[@set='isocat'])])"/></ds:value> 102 <ds:value key="available-concepts"><xsl:value-of select="count($dcr-terms//Concept)"/></ds:value> 103 <ds:value key="unused-concepts"><xsl:value-of select="count($dcr-terms//Concept except $dcr-terms//Concept[@id=$dcr-cmd-map//Concept/@id])"/></ds:value> 104 </ds:dataseries> 105 106 </ds:dataset> 106 107 <!-- 107 108 <tr><td>profileDescription</td><td align="right"><xsl:value-of select="count(//profileDescription)"/></td></tr> … … 140 141 </xsl:template> 141 142 142 <xsl:template name="summary-concepts">143 144 <table>145 <caption>Data Categories Sets</caption>146 <tbody>147 <xsl:for-each select="$dcr-terms//Termset" >148 <tr><td><xsl:value-of select="@set"></xsl:value-of></td>149 <td align="right"><xsl:value-of select="count(Concept)"></xsl:value-of></td>150 </tr>151 </xsl:for-each>152 </tbody>153 </table>154 </xsl:template>155 156 143 157 144 <xsl:template name="summary-profiles"> 158 145 159 <dataset key="profile" label="Profiles" count="{count($cmd-terms//Termset)}"> 160 <labels> 161 <label key="components"></label> 162 <label key="elements"></label> 163 <label key="distinct-datcats"></label> 164 <label key="elems-with-datcats"></label> 165 <label key="elems-without-datcats"></label> 166 <label key="elems-without-datcats-ratio" >ratio of elements without DatCats</label> 167 </labels> 146 <ds:dataset key="profile" label="Profiles" count="{count($cmd-terms//Termset)}"> 147 <ds:labels> 148 <ds:label key="components">Components</ds:label> 149 <ds:label key="distinct-components">distinct Components</ds:label> 150 <ds:label key="elements">Elements</ds:label> 151 <ds:label key="distinct-elements">distinct Elements</ds:label> 152 <ds:label key="distinct-datcats"></ds:label> 153 <ds:label key="elems-with-datcats"></ds:label> 154 <ds:label key="elems-without-datcats"></ds:label> 155 <ds:label key="elems-without-datcats-ratio" >ratio of elements without DatCats</ds:label> 156 </ds:labels> 168 157 169 158 <xsl:for-each select="$cmd-terms//Termset" > 170 159 <xsl:sort select="@name" order="ascending"/> 160 <xsl:variable name="profile_id" select="xs:string(@id)" ></xsl:variable> 171 161 <xsl:variable name="count_elems" select="count(./Term[@type='CMD_Element'])" ></xsl:variable> 172 162 <xsl:variable name="count_distinct_datcats" select="count(distinct-values(./Term[@type='CMD_Element']/@datcat[not(.='')]))" ></xsl:variable> 173 163 174 <dataseries key="{@id}" label="{@name}" > 175 <!-- <value key="distinct-components"><xsl:value-of select="$count_distinct_components"/></value>--> 176 <value key="components"><xsl:value-of select="count(./Term[@type='CMD_Component'])"/></value> 177 <!-- <value key="distinct-elements"><xsl:value-of select="$count_distinct_elems"/></value>--> 178 <value key="elements"><xsl:value-of select="$count_elems"/></value> 179 <value key="distinct-datcats"><xsl:value-of select="$count_distinct_datcats"/></value> 180 <value key="elems-with-datcats"><xsl:value-of select="count(./Term[@type='CMD_Element']/@datcat[not(.='')])"/></value> 181 <value key="elems-without-datcats"><xsl:value-of select="count(./Term[@type='CMD_Element'][@datcat=''])"/></value> 182 <xsl:variable name="elems-without-datcats-ratio" select="count(./Term[@type='CMD_Element'][@datcat='']) div $count_elems"></xsl:variable> 183 <value key="elems-without-datcats-ratio" formatted="{format-number($elems-without-datcats-ratio, '0.00 %')}"> 184 <xsl:value-of select="$elems-without-datcats-ratio"/></value> 185 </dataseries> 164 <ds:dataseries key="{@id}" label="{@name}" > 165 <!-- <ds:value key="distinct-components"><xsl:value-of select="$count_distinct_components"/></ds:value>--> 166 <xsl:call-template name="list"> 167 <xsl:with-param name="key">components</xsl:with-param> 168 <!-- exclude the profile as component--> 169 <xsl:with-param name="data" select="./Term[@type='CMD_Component'][not(xs:string(@id)=$profile_id)]"></xsl:with-param> 170 </xsl:call-template> 171 <!-- <ds:value key="components"><xsl:value-of select="count(./Term[@type='CMD_Component'])"/></ds:value>--> 172 <ds:value key="distinct-components"><xsl:value-of select="count(distinct-values(.//Term[@type='CMD_Component'][not(@parent='')]/@id))" /></ds:value> 173 <xsl:call-template name="list"> 174 <xsl:with-param name="key">elements</xsl:with-param> 175 <xsl:with-param name="data" select="./Term[@type='CMD_Element']"></xsl:with-param> 176 </xsl:call-template> 177 <ds:value key="distinct-elements"><xsl:value-of select="count(distinct-values(.//Term[@type='CMD_Element'][not(@parent='')]/@id))" /></ds:value> 178 <!-- <ds:value key="elements"><xsl:value-of select="$count_elems"/></ds:value>--> 179 <xsl:call-template name="list"> 180 <xsl:with-param name="key">distinct-datcats</xsl:with-param> 181 <xsl:with-param name="type">datcat</xsl:with-param> 182 <xsl:with-param name="data" select="distinct-values(./Term[@type='CMD_Element']/@datcat[not(.='')])"></xsl:with-param> 183 </xsl:call-template> 184 185 <!-- <ds:value key=""><xsl:value-of select="$count_distinct_datcats"/></ds:value>--> 186 <ds:value key="elems-with-datcats"><xsl:value-of select="count(./Term[@type='CMD_Element']/@datcat[not(.='')])"/></ds:value> 187 <ds:value key="elems-without-datcats"><xsl:value-of select="count(./Term[@type='CMD_Element'][@datcat=''])"/></ds:value> 188 <xsl:variable name="elems-without-datcats-ratio" select="if($count_elems > 0) then count(./Term[@type='CMD_Element'][@datcat='']) div $count_elems else 0"></xsl:variable> 189 <ds:value key="elems-without-datcats-ratio" formatted="{format-number($elems-without-datcats-ratio, '0.00 %')}"> 190 <xsl:value-of select="$elems-without-datcats-ratio"/></ds:value> 191 </ds:dataseries> 186 192 </xsl:for-each> 187 </d ataset>193 </ds:dataset> 188 194 </xsl:template> 189 195 190 196 <xsl:template name="summary-components"> 191 197 192 <d ataset key="component" label="Components" count="{count($cmd-terms//Term[@type='CMD_Component'])}">193 < labels>194 < label key="used">used in total</label>195 < label key="profiles">used in Profiles</label>196 < label key="components">has Components</label>197 < label key="distinct-elems">has Elements</label>198 < label key="elems-with-datcats">Elements with DatCats</label>199 < label key="distinct-datcats">uses DatCats</label>200 < label key="elems-without-datcats">Elements without DatCats</label>201 < label key="elems-without-datcats-ratio" >ratio of elements without DatCats</label>202 </ labels>198 <ds:dataset key="component" label="Components" count="{count($cmd-terms//Term[@type='CMD_Component'])}"> 199 <ds:labels> 200 <ds:label key="used">used in total</ds:label> 201 <ds:label key="profiles">used in Profiles</ds:label> 202 <ds:label key="components">has Components</ds:label> 203 <ds:label key="distinct-elems">has Elements</ds:label> 204 <ds:label key="elems-with-datcats">Elements with DatCats</ds:label> 205 <ds:label key="distinct-datcats">uses DatCats</ds:label> 206 <ds:label key="elems-without-datcats">Elements without DatCats</ds:label> 207 <ds:label key="elems-without-datcats-ratio" >ratio of elements without DatCats</ds:label> 208 </ds:labels> 203 209 204 210 <xsl:for-each-group select="$cmd-terms-nested//Term[@type='CMD_Component']" group-by="@id"> … … 210 216 <xsl:variable name="count_distinct_datcats" select="count(distinct-values(current-group()//Term/@datcat[not(.='')]))" ></xsl:variable> 211 217 212 <d ataseries key="{@id}" label="{@name}" >213 <!-- < value key="distinct-components"><xsl:value-of select="$count_distinct_components"/></value>-->214 < value key="used"><xsl:value-of select="$count_usage"/></value>215 < value key="profiles"><xsl:value-of select="$count_using_profiles"/></value>216 < value key="components"><xsl:value-of select="count(distinct-values(current-group()//Term[@type='CMD_Component']/@id))"/></value>217 <!-- < value key="distinct-elements"><xsl:value-of select="$count_distinct_elems"/></value>-->218 < value key="distinct-elems"><xsl:value-of select="$count_distinct_elems"/></value>219 < value key="elems-with-datcats"><xsl:value-of select="count(distinct-values(current-group()//Term[@type='CMD_Element'][@datcat[not(.='')]]/@id))"/></value>220 < value key="distinct-datcats"><xsl:value-of select="$count_distinct_datcats"/></value>218 <ds:dataseries key="{@id}" label="{@name}" > 219 <!-- <ds:value key="distinct-components"><xsl:value-of select="$count_distinct_components"/></ds:value>--> 220 <ds:value key="used"><xsl:value-of select="$count_usage"/></ds:value> 221 <ds:value key="profiles"><xsl:value-of select="$count_using_profiles"/></ds:value> 222 <ds:value key="components"><xsl:value-of select="count(distinct-values(current-group()//Term[@type='CMD_Component']/@id))"/></ds:value> 223 <!-- <ds:value key="distinct-elements"><xsl:value-of select="$count_distinct_elems"/></ds:value>--> 224 <ds:value key="distinct-elems"><xsl:value-of select="$count_distinct_elems"/></ds:value> 225 <ds:value key="elems-with-datcats"><xsl:value-of select="count(distinct-values(current-group()//Term[@type='CMD_Element'][@datcat[not(.='')]]/@id))"/></ds:value> 226 <ds:value key="distinct-datcats"><xsl:value-of select="$count_distinct_datcats"/></ds:value> 221 227 <xsl:variable name="elems-without-datcats" select="count(distinct-values(current-group()//Term[@type='CMD_Element'][@datcat='']/@id))" /> 222 < value key="elems-without-datcats"><xsl:value-of select="$elems-without-datcats"/></value>228 <ds:value key="elems-without-datcats"><xsl:value-of select="$elems-without-datcats"/></ds:value> 223 229 <xsl:variable name="elems-without-datcats-ratio" select="if ($count_distinct_elems > 0) then $elems-without-datcats div $count_distinct_elems else 0"></xsl:variable> 224 < value key="elems-without-datcats-ratio" formatted="{format-number($elems-without-datcats-ratio, '0.00 %')}">225 <xsl:value-of select="$elems-without-datcats-ratio"/></ value>226 </d ataseries>230 <ds:value key="elems-without-datcats-ratio" formatted="{format-number($elems-without-datcats-ratio, '0.00 %')}"> 231 <xsl:value-of select="$elems-without-datcats-ratio"/></ds:value> 232 </ds:dataseries> 227 233 </xsl:for-each-group> 228 </d ataset>234 </ds:dataset> 229 235 </xsl:template> 230 236 … … 232 238 <xsl:template name="summary-datcats"> 233 239 234 <d ataset key="datcat" label="Data Categories" count="{count($dcr-cmd-map//Concept)}">235 < labels>236 < label key="def">Definition</label>237 < label key="used-in-profiles">used in Profiles</label>238 < label key="referenced-by-elements">referenced by Elements</label>239 </ labels>240 <ds:dataset key="datcat" label="Data Categories" count="{count($dcr-cmd-map//Concept)}"> 241 <ds:labels> 242 <ds:label key="def">Definition</ds:label> 243 <ds:label key="used-in-profiles">used in Profiles</ds:label> 244 <ds:label key="referenced-by-elements">referenced by Elements</ds:label> 245 </ds:labels> 240 246 241 247 … … 249 255 <xsl:variable name="profiles" select="distinct-values(Term[@type='full-path']/@schema)" ></xsl:variable> 250 256 251 <d ataseries key="{@id}" label="{Term[@type='label'][1]}" >252 <!-- < value key="distinct-components"><xsl:value-of select="$count_distinct_components"/></value>-->257 <ds:dataseries key="{@id}" label="{Term[@type='label'][1]}" > 258 <!-- <ds:value key="distinct-components"><xsl:value-of select="$count_distinct_components"/></ds:value>--> 253 259 254 <value key="def"><xsl:value-of select="$def"/></value> 255 <value key="used-in-profiles" abs="{count($profiles)}" > 256 <list> 257 <xsl:for-each select="$profiles" > 258 <xsl:variable name="profile-name" select="$all_profiles[@id=current()]/@name"></xsl:variable> 259 <li><a href="#{.}" ><xsl:value-of select="$profile-name" /></a></li> 260 </xsl:for-each> 261 </list> 262 </value> 263 <value key="referenced-by-elements"><xsl:value-of select="$count_elems"/></value> 264 </dataseries> 260 <ds:value key="def"><xsl:value-of select="$def"/></ds:value> 261 <xsl:call-template name="list"> 262 <xsl:with-param name="key" >used-in-profiles</xsl:with-param> 263 <xsl:with-param name="type" >profile</xsl:with-param> 264 <xsl:with-param name="data" select="$profiles" /> 265 </xsl:call-template> 266 267 <ds:value key="referenced-by-elements"><xsl:value-of select="$count_elems"/></ds:value> 268 </ds:dataseries> 265 269 </xsl:for-each> 266 </d ataset>270 </ds:dataset> 267 271 <!-- 268 272 <table> … … 340 344 341 345 342 <xsl:template name="ambigue-elems"> 343 <table> 344 <caption>Ambigue elements</caption> 345 <thead><tr><th>comp-name</th><th colspan="3">datcat</th><th>count</th><th>profiles</th></tr></thead> 346 <tbody> 347 <xsl:for-each-group select="$cmd-terms//Term" group-by="lower-case(@name)"> 348 <!-- <xsl:sort select="lower-case(@name)" /> --> 346 <xsl:template name="ambigue-terms"> 347 <ds:dataset key="ambigue-terms" label="Ambigue terms" > 348 <ds:label key="term">Term</ds:label> 349 <ds:label key="usage">usage</ds:label> 350 <ds:label key="datcat">distinct DatCats</ds:label> 351 <ds:label key="profiles">used in Profiles</ds:label> 352 <xsl:for-each-group select="$cmd-terms//Term" group-by="lower-case(@name)"> 353 <!-- <xsl:sort select="lower-case(@name)" /> --> 349 354 <xsl:sort select="count(distinct-values(current-group()/@datcat))" order="descending" data-type="number"></xsl:sort> 355 <xsl:if test="count(distinct-values(current-group()/@id)) > 1" > 356 <ds:dataseries key="{@name}" label="{@name}"> 357 <!-- <ds:value key="term"><xsl:value-of select="@name"></xsl:value-of></ds:value>--> 358 <xsl:call-template name="list"> 359 <xsl:with-param name="key">usage</xsl:with-param> 360 <xsl:with-param name="data" select="distinct-values(current-group()/xs:string(@id))"></xsl:with-param> 361 </xsl:call-template> 362 <xsl:call-template name="list"> 363 <xsl:with-param name="key">datcat</xsl:with-param> 364 <xsl:with-param name="type">datcat</xsl:with-param> 365 <xsl:with-param name="data" select="distinct-values(current-group()/xs:string(@datcat))"></xsl:with-param> 366 </xsl:call-template> 367 <xsl:call-template name="list"> 368 <xsl:with-param name="key">profiles</xsl:with-param> 369 <xsl:with-param name="type">profile</xsl:with-param> 370 <xsl:with-param name="data" select="distinct-values(current-group()/ancestor::Termset/@id)"></xsl:with-param> 371 </xsl:call-template> 372 </ds:dataseries> 373 </xsl:if> 374 375 <!-- 350 376 <tr> 351 <!- - <td><xsl:value-of select="@id"/></td>-->377 <!-\- <td><xsl:value-of select="@id"/></td>-\-> 352 378 <td><xsl:value-of select="@name"/></td> 353 379 <td><xsl:value-of select="count(distinct-values(current-group()/@datcat))"/></td> 354 380 <td><xsl:value-of select="count(distinct-values(current-group()/@id))"/></td> 355 </tr> 381 </tr>--> 356 382 </xsl:for-each-group> 357 </tbody> 358 </table> 383 </ds:dataset> 359 384 </xsl:template> 360 385 386 387 <xsl:template name="list" > 388 <xsl:param name="key" ></xsl:param> 389 <xsl:param name="type" ></xsl:param> 390 <xsl:param name="data" ></xsl:param> 391 392 <xsl:variable name="processed_data"> 393 <xsl:choose> 394 <xsl:when test="$data[1] instance of element(li)"> 395 <xsl:copy-of select="$data" /> 396 </xsl:when> 397 <xsl:when test="$data[1] instance of element()"> 398 <xsl:for-each select="$data"> 399 <ds:li key="{(@id,@path,@name)[1]}" title="{(@path,@id,@key,@name)[1]}"><xsl:value-of select="(@name,@label,@key, @path, @id)[1]"></xsl:value-of></ds:li> 400 </xsl:for-each> 401 </xsl:when> 402 <!-- 403 <xsl:for-each select="$data"> 404 <li key="{.}"><xsl:value-of select="."></xsl:value-of></li> 405 </xsl:for-each> 406 </xsl:when> 407 <xsl:when test="$data[1] instance of xs:untypedAtomic"> 408 <li key="data"><xsl:value-of select="$data"></xsl:value-of></li> 409 <xsl:for-each select="$data/node()"> 410 <li key="{.}"><xsl:value-of select="."></xsl:value-of></li> 411 </xsl:for-each> 412 </xsl:when> 413 <xsl:when test="$data[1] instance of attribute()"> 414 <xsl:for-each select="$data"> 415 <li key="{xs:string(.)}"><xsl:value-of select="xs:string(.)"></xsl:value-of></li> 416 </xsl:for-each> 417 </xsl:when>--> 418 <xsl:otherwise> 419 <xsl:for-each select="$data"> 420 421 <xsl:variable name="label" > 422 <xsl:choose> 423 <xsl:when test=".=''">_EMPTY_</xsl:when> 424 <xsl:when test="$type='profile'"> 425 <xsl:value-of select="$all_profiles[@id=xs:string(current())]/@name" ></xsl:value-of> 426 </xsl:when> 427 <xsl:when test="$type='datcat'"> 428 <xsl:value-of select="$all_datcats[@id=xs:string(current())]/Term[@type='label'][1]/text()" ></xsl:value-of> 429 </xsl:when> 430 <xsl:otherwise> 431 <xsl:value-of select="xs:string(.)"></xsl:value-of> 432 </xsl:otherwise> 433 </xsl:choose> 434 </xsl:variable> 435 436 <ds:li key="{xs:string(.)}"><xsl:value-of select="($label, my:shortURL(xs:string(.)))[.!=''][1]"></xsl:value-of></ds:li> 437 </xsl:for-each> 438 </xsl:otherwise> 439 </xsl:choose> 440 </xsl:variable> 441 <ds:value key="{$key}" abs="{count($processed_data/*)}" > 442 <ds:list> 443 <xsl:for-each select="$processed_data/*" > 444 <xsl:sort select="lower-case(.)" ></xsl:sort> 445 <!--<xsl:variable name="profile-name" select="$all_profiles[@id=current()]/@name"></xsl:variable>--> 446 <!-- <li><a href="#{.}" ><xsl:value-of select="$profile-name" /></a></li>--> 447 <xsl:copy-of select="."></xsl:copy-of> 448 </xsl:for-each> 449 </ds:list> 450 </ds:value> 451 </xsl:template> 361 452 <!-- 362 453 <xsl:template name="list-terms">
Note: See TracChangeset
for help on using the changeset viewer.