[jboss-svn-commits] JBL Code SVN: r30974 - labs/jbosstm/workspace/whitingjr/trunk/performance/src/main/resources/xsl.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Thu Jan 7 13:35:15 EST 2010
Author: whitingjr
Date: 2010-01-07 13:35:15 -0500 (Thu, 07 Jan 2010)
New Revision: 30974
Added:
labs/jbosstm/workspace/whitingjr/trunk/performance/src/main/resources/xsl/analyseresults-02.xsl
Log:
Added second stylesheet to process xml into final version.
Added: labs/jbosstm/workspace/whitingjr/trunk/performance/src/main/resources/xsl/analyseresults-02.xsl
===================================================================
--- labs/jbosstm/workspace/whitingjr/trunk/performance/src/main/resources/xsl/analyseresults-02.xsl (rev 0)
+++ labs/jbosstm/workspace/whitingjr/trunk/performance/src/main/resources/xsl/analyseresults-02.xsl 2010-01-07 18:35:15 UTC (rev 30974)
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+ <xsl:template match="/">
+ <xsl:apply-templates/>
+ </xsl:template>
+
+ <xsl:template match="analysis">
+ <xsl:copy>
+ <xsl:apply-templates/>
+ </xsl:copy>
+ </xsl:template>
+
+ <xsl:template match="summary-analysis">
+ <xsl:copy>
+ <xsl:copy-of select="category-0"/>
+
+ <xsl:apply-templates select="category-A"/>
+
+ <xsl:copy-of select="category-B"/>
+ <xsl:copy-of select="category-C"/>
+ <xsl:copy-of select="category-D"/>
+ </xsl:copy>
+ </xsl:template>
+
+ <xsl:template match="category-A">
+ <xsl:copy>
+ <xsl:element name="frame" >
+ <xsl:attribute name="everything">else</xsl:attribute>
+ <xsl:element name="methodDuration">
+ <xsl:element name="gross"><xsl:value-of select="preceding::frame/methodDuration/gross - sum (following::frame/methodDuration/gross)"/></xsl:element>
+ <xsl:element name="net"><xsl:value-of select="preceding::frame/methodDuration/net - sum (following::frame/methodDuration/net)"/></xsl:element>
+ <xsl:element name="gross-average"><xsl:value-of select="(preceding::frame/methodDuration/gross - sum (following::frame/methodDuration/gross)) div preceding::frame/@c"/></xsl:element>
+ <xsl:element name="net-average"><xsl:value-of select="(preceding::frame/methodDuration/net - sum (following::frame/methodDuration/net)) div preceding::frame/@c"/></xsl:element>
+ </xsl:element>
+ <xsl:comment>Package totals are not relevant</xsl:comment>
+ </xsl:element>
+ </xsl:copy>
+ </xsl:template>
+
+</xsl:stylesheet>
\ No newline at end of file
More information about the jboss-svn-commits
mailing list