During our tests to upgrade to XSLT2.0 using Saxon8b with Tomcat 5.5.9 we keep getting the following error:

java.lang.IllegalArgumentException: Unsupported node type in DOM! 10 instance [root: null]
        net.sf.saxon.dom.NodeWrapper.makeWrapper(NodeWrapper.java:102)
        net.sf.saxon.dom.NodeWrapper.makeWrapper(NodeWrapper.java:58)
        net.sf.saxon.dom.DocumentWrapper.wrap(DocumentWrapper.java:44)
        net.sf.saxon.dom.DOMObjectModel.wrapNode(DOMObjectModel.java:293)
        net.sf.saxon.dom.DOMObjectModel.convertObjectToXPathValue(DOMObjectModel.java:151)
        net.sf.saxon.value.Value.convertJavaObjectToXPath(Value.java:783)
        net.sf.saxon.instruct.Bindery.useGlobalParameter(Bindery.java:73)
        net.sf.saxon.instruct.GlobalParam.evaluateVariable(GlobalParam.java:36)
        net.sf.saxon.expr.VariableReference.evaluateVariable(VariableReference.java:221)
        net.sf.saxon.expr.VariableReference.iterate(VariableReference.java:194)
        net.sf.saxon.expr.ItemChecker.iterate(ItemChecker.java:83)
        net.sf.saxon.expr.PathExpression.iterate(PathExpression.java:664)
        net.sf.saxon.expr.PathExpression.iterate(PathExpression.java:664)
        net.sf.saxon.sort.DocumentSorter.iterate(DocumentSorter.java:65)
        net.sf.saxon.instruct.SimpleContentConstructor.evaluateItem(SimpleContentConstructor.java:198)
        net.sf.saxon.instruct.SimpleNodeConstructor.expandChildren(SimpleNodeConstructor.java:100)
        net.sf.saxon.instruct.ValueOf.processLeavingTail(ValueOf.java:144)
        net.sf.saxon.instruct.Block.processLeavingTail(Block.java:330)
        net.sf.saxon.instruct.Instruction.process(Instruction.java:87)
        net.sf.saxon.instruct.ElementCreator.processLeavingTail(ElementCreator.java:155)
        net.sf.saxon.instruct.Template.expand(Template.java:98)
        net.sf.saxon.instruct.CallTemplate.process(CallTemplate.java:191)
        net.sf.saxon.instruct.CallTemplate.processLeavingTail(CallTemplate.java:216)
        net.sf.saxon.instruct.Block.processLeavingTail(Block.java:330)
        net.sf.saxon.instruct.Instruction.process(Instruction.java:87)
        net.sf.saxon.instruct.ElementCreator.processLeavingTail(ElementCreator.java:155)
        net.sf.saxon.instruct.Block.processLeavingTail(Block.java:330)
        net.sf.saxon.instruct.Instruction.process(Instruction.java:87)
        net.sf.saxon.instruct.ElementCreator.processLeavingTail(ElementCreator.java:155)
        net.sf.saxon.instruct.Template.expand(Template.java:98)
        net.sf.saxon.instruct.Template.processLeavingTail(Template.java:82)
        net.sf.saxon.instruct.ApplyTemplates.applyTemplates(ApplyTemplates.java:298)
        net.sf.saxon.Controller.transformDocument(Controller.java:1367)
        net.sf.saxon.Controller.transform(Controller.java:1195)
        org.apache.taglibs.standard.tag.common.xml.TransformSupport.doEndTag(Unknown Source)
        org.apache.jsp.contractonderwijs.index_jsp._jspx_meth_x_transform_8(org.apache.jsp.contractonderwijs.index_jsp:4373)

        org.apache.jsp.contractonderwijs.index_jsp._jspService(org.apache.jsp.contractonderwijs.index_jsp:810)
        org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
        org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
        org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
        org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

The Tomcat console shows only the following warning:

Warning: Running an XSLT 1.0 stylesheet with an XSLT 2.0 processor
Warning: Running an XSLT 1.0 stylesheet with an XSLT 2.0 processor
Warning: at xsl:variable on line 45 of :
  SXWN9001: A variable with no following sibling instructions has no effect

In essence, in a first stylesheet _site.xslt we are calling a template from another stylesheet _module.xslt:

----------------------
_site.xslt
-----------------------
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >
...
    <!-- PAGECONTENT -->
    <xsl:template name="pagecontent">
        <xsl:comment>pagecontent</xsl:comment>
        <!-- call template page from imported xslt -->
         <xsl:call-template name="page">
           <xsl:with-param name="mystep" select="'1'"/>
         </xsl:call-template>
        <xsl:comment>//pagecontent</xsl:comment>
    </xsl:template>
...
</xsl:stylesheet>

----------------------
_module.xslt
-----------------------
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >
...
    <!-- TEMPLATE: PAGE -->
    <xsl:template name="page">
        <xsl:param name="mystep"/>
        <h1><xsl:value-of select="$mystep"/></h1>
    </xsl:template>
...
</xsl:stylesheet>

Has anyone encountered this type of problem? I could not find any references in the forums.

Thanx,

Eric van der Steen
University of Amsterdam