Skip to content

Commit 76029fd

Browse files
author
WolfgangWalter Sauer (wowasa)
committed
text alignment right for numbers
1 parent 9f4dfd2 commit 76029fd

File tree

2 files changed

+22
-22
lines changed

2 files changed

+22
-22
lines changed

curation-module-web/src/main/resources/xslt/XML2HTMLCollection.xsl

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@
1616

1717
<p>Total Score: <xsl:value-of select="./@score"/> out of <xsl:value-of select="./@col-max-score"/></p>
1818
<p>Score percentage: <xsl:value-of select="format-number(./@score-percentage,'##.#%')"/></p>
19-
<p>Average Score: <xsl:value-of select="./@avg-score"/> out of <xsl:value-of select="./@ins-max-score"/></p>
20-
<p>Maximal score in collection: <xsl:value-of select="./@max-score"/></p>
21-
<p>Minimal score in collection: <xsl:value-of select="./@min-score"/></p>
19+
<p>Average Score: <xsl:value-of select="format-number(./@avg-score,'##.##')"/> out of <xsl:value-of select="format-number(./@ins-max-score,'##.##')"/></p>
20+
<p>Maximal score in collection: <xsl:value-of select="format-number(./@max-score,'##.##')"/></p>
21+
<p>Minimal score in collection: <xsl:value-of select="format-number(./@min-score,'##.##')"/></p>
2222

2323
<hr/>
2424

@@ -57,8 +57,8 @@
5757
<xsl:variable name="profileID"><xsl:value-of select="./@name"/></xsl:variable>
5858
<tr>
5959
<td><a href="#!ResultView/profile/id/{$profileID}"><xsl:copy-of select="$profileID"/></a></td>
60-
<td><xsl:value-of select="./@score"/></td>
61-
<td><xsl:value-of select="./@count"/></td>
60+
<td class="v-align-right"><xsl:value-of select="format-number(./@score,'##.##')"/></td>
61+
<td class="v-align-right"><xsl:value-of select="./@count"/></td>
6262
</tr>
6363
</xsl:for-each>
6464
</tbody>
@@ -81,7 +81,7 @@
8181
<xsl:for-each select="./facet-section/facets/facet">
8282
<tr>
8383
<td><xsl:value-of select="./@name"/></td>
84-
<td><xsl:value-of select="./@coverage"/></td>
84+
<td class="v-align-right"><xsl:value-of select="format-number(./@coverage,'##.#%')"/></td>
8585
</tr>
8686
</xsl:for-each>
8787
</tbody>
@@ -91,11 +91,11 @@
9191

9292
<h2>ResourceProxy Section</h2>
9393
<p>Total number of resource proxies: <xsl:value-of select="./resProxy-section/totNumOfResProxies"/></p>
94-
<p>Average number of resource proxies: <xsl:value-of select="./resProxy-section/avgNumOfResProxies"/></p>
94+
<p>Average number of resource proxies: <xsl:value-of select="format-number(./resProxy-section/avgNumOfResProxies,'##.##')"/></p>
9595
<p>Total number of resource proxies with MIME: <xsl:value-of select="./resProxy-section/totNumOfResourcesWithMime"/></p>
96-
<p>Average number of resource proxies with MIME: <xsl:value-of select="./resProxy-section/avgNumOfResourcesWithMime"/></p>
96+
<p>Average number of resource proxies with MIME: <xsl:value-of select="format-number(./resProxy-section/avgNumOfResourcesWithMime,'##.##')"/></p>
9797
<p>Total number of resource proxies with reference: <xsl:value-of select="./resProxy-section/totNumOfResProxiesWithReferences"/></p>
98-
<p>Average number of resource proxies with references: <xsl:value-of select="./resProxy-section/avgNumOfResProxiesWithReferences"/></p>
98+
<p>Average number of resource proxies with references: <xsl:value-of select="format-number(./resProxy-section/avgNumOfResProxiesWithReferences,'##.##')"/></p>
9999

100100
<hr/>
101101

@@ -117,26 +117,26 @@
117117

118118
<h2>XML Populated Section</h2>
119119
<p>Total number of XML elements: <xsl:value-of select="./xml-populated-section/totNumOfXMLElements"/></p>
120-
<p>Average number of XML elements: <xsl:value-of select="./xml-populated-section/avgNumOfXMLElements"/></p>
120+
<p>Average number of XML elements: <xsl:value-of select="format-number(./xml-populated-section/avgNumOfXMLElements,'##.##')"/></p>
121121
<p>Total number of simple XML elements: <xsl:value-of select="./xml-populated-section/totNumOfXMLSimpleElements"/></p>
122-
<p>Average number of simple XML elements: <xsl:value-of select="./xml-populated-section/avgNumOfXMLSimpleElements"/></p>
122+
<p>Average number of simple XML elements: <xsl:value-of select="format-number(./xml-populated-section/avgNumOfXMLSimpleElements,'##.##')"/></p>
123123
<p>Total number of empty XML elements: <xsl:value-of select="./xml-populated-section/totNumOfXMLEmptyElement"/></p>
124-
<p>Average number of empty XML elements: <xsl:value-of select="./xml-populated-section/avgXMLEmptyElement"/></p>
124+
<p>Average number of empty XML elements: <xsl:value-of select="format-number(./xml-populated-section/avgXMLEmptyElement,'##.##')"/></p>
125125
<p>Average rate of populated elements: <xsl:value-of select="format-number(./xml-populated-section/avgRateOfPopulatedElements,'##.#%')"/></p>
126126

127127
<hr/>
128128

129129
<h2>URL Validation Section</h2>
130130
<p>Total number of links: <xsl:value-of select="./url-validation-section/totNumOfLinks"/></p>
131-
<p>Average number of links: <xsl:value-of select="./url-validation-section/avgNumOfLinks"/></p>
131+
<p>Average number of links: <xsl:value-of select="format-number(./url-validation-section/avgNumOfLinks,'##.##')"/></p>
132132
<p>Total number of unique links: <xsl:value-of select="./url-validation-section/totNumOfUniqueLinks"/></p>
133133
<p>Total number of checked links: <xsl:value-of select="./url-validation-section/totNumOfCheckedLinks"/></p>
134134
<p>Total number of undetermined links: <xsl:value-of select="./url-validation-section/totNumOfUndeterminedLinks"/></p>
135-
<p>Average number of unique links: <xsl:value-of select="./url-validation-section/avgNumOfUniqueLinks"/></p>
135+
<p>Average number of unique links: <xsl:value-of select="format-number(./url-validation-section/avgNumOfUniqueLinks,'##.##')"/></p>
136136
<!--<p>Total number of resourceProxy links: <xsl:value-of select="./url-validation-section/totNumOfResProxiesLinks"/></p>-->
137137
<!--<p>Average number of resourceProxy links: <xsl:value-of select="./url-validation-section/avgNumOfResProxiesLinks"/></p>-->
138138
<p>Total number of broken links: <xsl:value-of select="./url-validation-section/totNumOfBrokenLinks"/></p>
139-
<p>Average number of broken links: <xsl:value-of select="./url-validation-section/avgNumOfBrokenLinks"/></p>
139+
<p>Average number of broken links: <xsl:value-of select="format-number(./url-validation-section/avgNumOfBrokenLinks,'##.##')"/></p>
140140
<p>Ratio of valid links: <xsl:value-of select="format-number(./url-validation-section/ratioOfValidLinks,'##.#%')"/></p>
141141

142142

curation-module-web/src/main/resources/xslt/XML2HTMLProfile.xsl

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -57,16 +57,16 @@
5757
</thead>
5858
<tfoot>
5959
<tr><td colspan="3"><b>
60-
total: <xsl:value-of select="./@score"/>
61-
max: <xsl:value-of select="./@max-score"/>
60+
total: <xsl:value-of select="format-number(./@score,'##.##')"/>
61+
max: <xsl:value-of select="format-number(./@max-score,'##.##')"/>
6262
</b></td></tr>
6363
</tfoot>
6464
<tbody>
6565
<xsl:for-each select="./score-section/score">
6666
<tr>
6767
<td><xsl:value-of select="./@segment"/></td>
68-
<td><xsl:value-of select="./@score"/></td>
69-
<td><xsl:value-of select="./@maxScore"/></td>
68+
<td class="v-align-right"><xsl:value-of select="format-number(./@score,'##.##')"/></td>
69+
<td class="v-align-right"><xsl:value-of select="format-number(./@maxScore,'##.##')"/></td>
7070
</tr>
7171
</xsl:for-each>
7272
</tbody>
@@ -87,7 +87,7 @@
8787
covered:
8888
<xsl:value-of select="count(./facets-section/coverage/facet[@coveredByProfile = 'true'])" /> /
8989
<xsl:value-of select="./facets-section/@numOfFacets"/>
90-
coverage: <xsl:value-of select="./facets-section/@profileCoverage"/>
90+
coverage: <xsl:value-of select="format-number(./facets-section/@profileCoverage,'##.#%')"/>
9191
</b></td></tr>
9292
</tfoot>
9393
<tbody>
@@ -131,7 +131,7 @@
131131
<xsl:variable name="href">http://catalog.clarin.eu/ds/ComponentRegistry/rest/registry/components/<xsl:value-of select="./@id" /></xsl:variable>
132132
<td><xsl:value-of select="./@name"/></td>
133133
<td><a href="{$href}" target="_blank"><xsl:value-of select="./@id" /></a></td>
134-
<td><xsl:value-of select="./@count"/></td>
134+
<td class="v-align-right"><xsl:value-of select="./@count"/></td>
135135
</tr>
136136
</xsl:for-each>
137137
</tbody>
@@ -163,7 +163,7 @@
163163
<xsl:variable name="href"><xsl:value-of select="./@uri" /></xsl:variable>
164164
<td><a href="{$href}" title="{$href}" target="_blank"><xsl:value-of select="./@prefLabel" /></a></td>
165165
<td><xsl:value-of select="./@status"/></td>
166-
<td><xsl:value-of select="./@count"/></td>
166+
<td class="v-align-right"><xsl:value-of select="./@count"/></td>
167167
</tr>
168168
</xsl:for-each>
169169
</tbody>

0 commit comments

Comments
 (0)