Hi Folks,
Bit of a XSLT newbie here, so it may be really obvious but...
I've been looking at Jeni Tennison's XSLT unit testing templates
(http://www.jenitennison.com/xslt/utilities/unit-testing
<http://www.jenitennison.com/xslt/utilities/unit-testing> ) and in the
absence of a sample file, tried to use the sample square function from the
site. However, I get the following error;
Running Tests...
Error at xsl:when on line 382 of
file:/D:/temp/tennison/generate-tests-utils.xsl:
XPST0003: XPath syntax error at char 19 on line 382 in {$value instance of
void()}:
Expected type name in SequenceType, found <function>(
Input regex: '
Output regex: '
Failed to compile stylesheet. 1 error detected.
It seems to have a problem with generate-tests-utils (line 381);
...
<xsl:when test="$value instance of void()">()</xsl:when> <!--
this is the offending line! -->
...
If I comment the line out, it works fine. I'm using Saxon 8.7 and not 8.4B
as mentioned on the site.
The template i'm testing looks like this.
<xsl:stylesheet version="2.0" ... >
<test:tests>
<test:test>
<test:param name="number" select="2" />
<test:expect select="4"/>
</test:test>
</test:tests>
<xsl:function name="eg:square" as="xs:double">
<xsl:param name="number" as="xs:double" />
<xsl:sequence select="$number * $number" />
</xsl:function>
</xsl:stylesheet>
Thanks in advance for any pointers.
Cheers,
Toby
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--