The knit stylesheet in the lib directory, knit.xsl, uses the document function like this:
document($sourcefilename,$docbase)
but $docbase is a string, not a nodeset, so xalan raises an error. If the stylesheet is in the same directory as the data files, I think the second argument can just be omitted (as a workaround).