1

I am executing selenium script on iPhone simulator , i am running server via ios-server0.6.3.jar . i am able to get all xslt reports on Mac by running scripts on safari browser, but when i am trying to execute the same script on iPhone simulator, getting following xslt exception..

[xslt] Processing /test-output/testng-results.xml to /XSLT_Reports/output/index.html
[xslt] Loading stylesheet /src/xslt/testng-results.xsl
[xslt] /src/xslt/testng-results.xsl:461:93:
Fatal Error! Cannot find a matching 1-argument function named {http://exslt.org/math}cos().
There is no Saxon extension function with the local name cos
[xslt] /src/xslt/testng-results.xsl:462:98: Fatal Error! Cannot find a matching 1-argument function named {http://exslt.org/math}sin(). There is no Saxon extension function with the local name sin
[xslt] /src/xslt/testng-results.xsl:466:111: Fatal Error! Cannot find a matching 1-argument function named {http://exslt.org/math}cos(). There is no Saxon extension function with the local name cos
[xslt] /src/xslt/testng-results.xsl:467:118: Fatal Error! Cannot find a matching 1-argument function named {http://exslt.org/math}sin(). There is no Saxon extension function with the local name sin 

Following code may creating problem:

<xsl:variable name="pi" select="3.141592"/>
<xsl:variable name="radius" select="130"/>

<xsl:variable name="failedPercent" select="format-number($failedCount div $totalCount, '###%')"/>
<xsl:variable name="failedAngle" select="($failedCount div $totalCount) * $pi * 2"/>
<xsl:variable name="failedX" select="$radius * math:cos($failedAngle)"/>
<xsl:variable name="failedY" select="-1 * $radius * math:sin($failedAngle)"/>
<xsl:variable name="failedArc" select="if ($failedAngle >= $pi) then 1 else 0"/>

<xsl:variable name="failedAngle_text" select="$failedAngle div 2"/>
<xsl:variable name="failedX_text" select="($radius div 2) * math:cos($failedAngle_text)"/>
<xsl:variable name="failedY_text" select="(-1 * ($radius div 2) * math:sin($failedAngle_text))"/>
C. M. Sperberg-McQueen
  • 24,596
  • 5
  • 38
  • 65
  • Please share your code... only logs are not enough to get it. – Sankumarsingh Sep 10 '13 at 13:09
  • check [this](http://stackoverflow.com/questions/450165/java-xslt-cannot-find-a-matching-1-argument-function) link – HemChe Sep 10 '13 at 13:24
  • @Sankumarsingh i have edited my post.. may be math:sin extension is creating problem.. –  Sep 10 '13 at 14:02
  • @swami.c.v: check https://code.google.com/p/graph2svg/issues/detail?id=1 perhaps this can help you. – Sankumarsingh Sep 10 '13 at 18:13
  • Finally i solved my problem. Actually ios-server.jar was creating problem while generating xslt reports. So after execution of scripts, i removed ios-driver.jar file from build path and then run command for generating xslt report. –  Sep 24 '13 at 11:52

1 Answers1

0

Finally i solved my problem. Actually ios-server.jar was creating problem while generating xslt reports. So after execution of scripts, i removed ios-driver.jar file from build path and then run command for generating xslt report.

Paul Sweatte
  • 24,148
  • 7
  • 127
  • 265