If that's true, it's definitely a bug. Using document() without a second parameter should resolve the path relative to the stylesheet. Only passing a node-set as second argument changes this behaviour, the path is resolved relative to this node-set:
With your test case it's indeed obvious. Report it as bug to Xalan.
Joerg
