Added support for batch modes and external XSLT documents.