Project

Profile

Help

How to connect?
Download (534 Bytes) Statistics
| Branch: | Tag: | Revision:

he / tags / 9.8.0.11 / samples / styles / total.xsl @ 02f8308b

1
<xsl:transform
2
 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
3
 version="1.0"
4
>
5

    
6
<!-- This style sheet totals the prices of the books. It is designed to be used
7
     with the JDOM2Example sample application, which adds a VALUE attribute to the data
8
     in books.xml before doing a transformation -->
9

    
10

    
11
<xsl:template match="/">
12

    
13
    <HTML>
14
    <BODY>
15
    <p>Total value of books in stock: <xsl:value-of 
16
            select="format-number(sum(//ITEM/@VALUE),'#0.00')"/></p>
17
    </BODY>
18
    </HTML>
19
</xsl:template>
20

    
21
</xsl:transform>	
(11-11/12)