How to add namespace to custom report xsl

Experiences, small talk, and other automation gossip.
mind
Posts: 11
Joined: Thu Jun 06, 2013 1:48 pm

How to add namespace to custom report xsl

Post by mind » Wed Feb 24, 2016 10:48 am

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>

mind
Posts: 11
Joined: Thu Jun 06, 2013 1:48 pm

Re: How to add namespace to custom report xsl

Post by mind » Mon Feb 29, 2016 11:51 am

Does anyone have a suggestion? :cry:

mind
Posts: 11
Joined: Thu Jun 06, 2013 1:48 pm

Re: How to add namespace to custom report xsl

Post by mind » Mon Mar 07, 2016 9:10 am

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.