Page 1 of 1

How to add namespace to custom report xsl

Posted: Wed Feb 24, 2016 10:48 am
by mind
Hello,

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>

Re: How to add namespace to custom report xsl

Posted: Mon Feb 29, 2016 11:51 am
by mind
Does anyone have a suggestion? :cry:

Re: How to add namespace to custom report xsl

Posted: Mon Mar 07, 2016 9:10 am
by mind
Just for the case, someone else was interested in this topic.

Response from the Ranorex Support:

Unfortunately, the way you customized the XSL template is not supported by Ranorex.
Our view, the rxlog file, expects certain data and entry points to load data dynamically, which are not part of the attached XSL file.