Skip to content

Commit

Permalink
#22 saxon
Browse files Browse the repository at this point in the history
  • Loading branch information
yegor256 committed Oct 26, 2017
1 parent 681bceb commit f31055d
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 3 deletions.
20 changes: 20 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,26 @@ SOFTWARE.
<artifactId>hamcrest-core</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>net.sourceforge.saxon</groupId>
<artifactId>saxon</artifactId>
<version>9.1.0.8</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>net.sourceforge.saxon</groupId>
<artifactId>saxon</artifactId>
<version>9.1.0.8</version>
<classifier>dom</classifier>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>net.sourceforge.saxon</groupId>
<artifactId>saxon</artifactId>
<version>9.1.0.8</version>
<classifier>xpath</classifier>
<scope>runtime</scope>
</dependency>
</dependencies>
<build>
<plugins>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
net.sf.saxon.TransformerFactoryImpl
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
net.sf.saxon.xpath.XPathFactoryImpl
1 change: 0 additions & 1 deletion src/main/resources/org/jpeek/index.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ SOFTWARE.
-->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" version="2.0">
<xsl:template match="/">
<xsl:text disable-output-escaping="yes">&lt;!DOCTYPE html&gt;</xsl:text>
<html lang="en">
<head>
<meta charset="UTF-8"/>
Expand Down
10 changes: 8 additions & 2 deletions src/main/resources/org/jpeek/jpeek.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ SOFTWARE.
-->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" version="2.0">
<xsl:template match="/">
<xsl:text disable-output-escaping="yes">&lt;!DOCTYPE html&gt;</xsl:text>
<html lang="en">
<head>
<meta charset="UTF-8"/>
Expand Down Expand Up @@ -70,7 +69,14 @@ SOFTWARE.
<xsl:text>, classes: </xsl:text>
<xsl:value-of select="count(//class)"/>
<xsl:text>, average: </xsl:text>
<xsl:value-of select="format-number(sum(//class/@value) div count(//class), '#.####')"/>
<xsl:choose>
<xsl:when test="//class">
<xsl:value-of select="format-number(sum(//class/@value) div count(//class), '#.####')"/>
</xsl:when>
<xsl:otherwise>
<xsl:text>0</xsl:text>
</xsl:otherwise>
</xsl:choose>
<xsl:text>.</xsl:text>
</p>
<xsl:apply-templates select="app"/>
Expand Down

0 comments on commit f31055d

Please sign in to comment.