we like to get some statistics from our test runs, e.g. how many activities, grouping by time, grouping by activity...
We made a xsl script to extract this information. That works fine. Now we like to integrate the xsl into the custom template xsl.
Unfortunately, this does not work. The receive an error message that the data or the transformation file is missing.
An xsl validity check shows that the custom xsl file is well-formed and valid. Also test with saxon went successfully.
Maybe there is a problem with adding a new namespace to the xsl file. We use exslt.org/common for the calculation.
A small sample that works with saxon but not with ranorex:
Code: Select all
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:exsl="http://exslt.org/common" extension-element-prefixes="exsl">
<xsl:output method="html"
indent="no"
encoding="iso-8859-1"
media-type="text/html"
doctype-public="-//W3C//DTD HTML 4.0//EN"/>
<xsl:variable name="cellsPerRow" select="3"/>
<xsl:variable name="maxItems" select="1000"/>
<xsl:param name="testcaserid"/>
<xsl:param name="loadAll" />
<xsl:template match="/">
<xsl:call-template name="SumMilli"/>
</xsl:template>
<xsl:template name="SumMilli">
<xsl:variable name="Time">
<xsl:for-each select="//item">
<milli><xsl:value-of select="number(substring-after(@time,'.'))"/></milli>
</xsl:for-each>
</xsl:variable>
<xsl:value-of select="sum(exsl:node-set($Time)/milli)"/>
</xsl:template>
</xsl:stylesheet>