Changeset 3470


Ignore:
Timestamp:
08/24/13 12:33:56 (11 years ago)
Author:
vronk
Message:

added profile-info-fields

File:
1 edited

Legend:

Unmodified
Added
Removed
  • SMC/trunk/SMC/src/xsl/smc2stats_datasets.xsl

    r3436 r3470  
    2929       
    3030  <xsl:param name="title" select="'SMC Stats'" />
    31    
     31
     32        <!--
     33               
     34                <info>
     35            <id xmlns:ns2="http://www.w3.org/1999/xlink">clarin.eu:cr1:p_1357720977520</id>
     36            <description xmlns:ns2="http://www.w3.org/1999/xlink">A CMDI profile for annotated text
     37                corpus resources.</description>
     38            <name xmlns:ns2="http://www.w3.org/1999/xlink">AnnotatedCorpusProfile</name>
     39            <registrationDate xmlns:ns2="http://www.w3.org/1999/xlink"
     40                >2013-01-31T11:57:12+00:00</registrationDate>
     41            <creatorName xmlns:ns2="http://www.w3.org/1999/xlink">nalida</creatorName>
     42            <userId xmlns:ns2="http://www.w3.org/1999/xlink">22</userId>
     43            <domainName xmlns:ns2="http://www.w3.org/1999/xlink"/>
     44            <ns2:href xmlns:ns2="http://www.w3.org/1999/xlink"
     45                >http://catalog.clarin.eu/ds/ComponentRegistry/rest/registry/profiles/clarin.eu:cr1:p_1357720977520</ns2:href>
     46            <groupName xmlns:ns2="http://www.w3.org/1999/xlink">CLARIN</groupName>
     47            <commentsCount xmlns:ns2="http://www.w3.org/1999/xlink">0</commentsCount>
     48            <showInEditor xmlns:ns2="http://www.w3.org/1999/xlink">true</showInEditor>
     49        </info>-->
     50       
     51<xsl:param name="profile-info-fields" >description,registrationDate,creatorName,domainName,groupName</xsl:param>
     52        <xsl:variable name="profile-info-fields-sequence" select="tokenize($profile-info-fields,',')"/>
     53               
    3254    <!--
    3355 <xsl:param name="map_file" select="'../../../../SMC/output/map_full.xml'" /> 
     
    144166<xsl:template name="summary-profiles">
    145167       
     168       
     169       
    146170        <ds:dataset key="profile" label="Profiles" count="{count($cmd-terms//Termset)}">
    147171                <ds:labels>
     172                        <xsl:for-each select="$profile-info-fields-sequence">
     173                                <ds:label key="{.}" ><xsl:value-of select="."/></ds:label>
     174                        </xsl:for-each>
    148175                        <ds:label key="components">Components</ds:label>
    149176                        <ds:label key="distinct-components">distinct Components</ds:label>
     
    154181                        <ds:label key="elems-without-datcats"></ds:label>
    155182                        <ds:label key="elems-without-datcats-ratio" >ratio of elements without DatCats</ds:label>
     183                       
    156184                </ds:labels>
    157185                               
     
    159187                        <xsl:sort select="@name" order="ascending"/>
    160188                <xsl:variable name="profile_id" select="xs:string(@id)" ></xsl:variable>
     189                <xsl:variable name="info" select="info" ></xsl:variable>
    161190                <xsl:variable name="count_elems" select="count(./Term[@type='CMD_Element'])" ></xsl:variable>
    162191                <xsl:variable name="count_distinct_datcats" select="count(distinct-values(./Term[@type='CMD_Element']/@datcat[not(.='')]))" ></xsl:variable>
    163192                                       
    164193                <ds:dataseries key="{@id}" label="{@name}" >
     194                        <xsl:for-each select="$profile-info-fields-sequence">
     195                                <ds:value key="{.}" ><xsl:value-of select="$info/*[local-name()=current()]" /></ds:value>
     196                        </xsl:for-each>
    165197<!--                    <ds:value key="distinct-components"><xsl:value-of select="$count_distinct_components"/></ds:value>-->
    166198                        <xsl:call-template name="list">
     
    189221                        <ds:value key="elems-without-datcats-ratio" formatted="{format-number($elems-without-datcats-ratio, '0.00 %')}">
    190222                        <xsl:value-of select="$elems-without-datcats-ratio"/></ds:value>
     223               
    191224                </ds:dataseries>
    192225                </xsl:for-each>
Note: See TracChangeset for help on using the changeset viewer.