Created attachment 37384 [details] Minimal test case JSP According to § 12.1 of the W3C XSLT 1.0 spec, "document("") refers to the root node of the stylesheet". However using JSP and the standard taglib, an empty sequence is returned in such case instead (please see attached a minimal example). I tested with v1.2.5 and also compiled the last SVN revision (as bug 60950 seems to be related to this issue). When the affected XSLT is processed with a standalone version of Xalan (2.7.2), the document function works as expected though.