File: sum1.xsl

package info (click to toggle)
xmlstarlet 1.6.1-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 2,412 kB
  • ctags: 656
  • sloc: sh: 4,735; ansic: 4,183; xml: 1,936; makefile: 70; awk: 43
file content (12 lines) | stat: -rw-r--r-- 396 bytes parent folder | download | duplicates (9)
1
2
3
4
5
6
7
8
9
10
11
12
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="text"/>
<xsl:param name="inputFile">-</xsl:param>
<xsl:template match="/">
  <xsl:call-template name="t1"/>
</xsl:template>
<xsl:template name="t1">
  <xsl:value-of select="sum(/xml/table/rec/numField)"/>
  <xsl:value-of select="'&#10;'"/>
</xsl:template>
</xsl:stylesheet>