I have tried the following stylesheet
Code:
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:output method="text"/>
<xsl:template match="/">
<xsl:value-of
select="count(/compositeReport/bookReport/bookList/book[not(bookId = document('test2009011203.xml')/bookExclusionList/bookId)])"/>
</xsl:template>
</xsl:stylesheet>
against the following two files:
Code:
<compositeReport>
<bookReport>
<bookList>
<book>
<bookId>102733</bookId>
<categoryList>
<category>Software</category>
</categoryList>
<synopsis>blah Blah</synopsis>
</book>
<book>
<bookId>103121</bookId>
<categoryList>
<category>fiction</category>
</categoryList>
<synopsis>Some Book thing</synopsis>
</book>
<book>
<bookId>102687</bookId>
<categoryList>
<category>Software</category>
</categoryList>
<synopsis>blah Blah</synopsis>
</book>
</bookList>
</bookReport>
</compositeReport>
<bookExclusionList>
<bookId>102687</bookId>
<bookId>102696</bookId>
</bookExclusionList>
with Saxon 6.5 and with Xalan java 2.7.1 from the command line and both output "2" as the correct result.
However when I try to use Xalan from the command line with the -xsltc flag then I get the error you describe. That looks like a bug in Xalan XSLTC as far as I can tell.
I think there is a Xalan user list where you might find more help with Xalan problems.