/** * Load the stylesheet to prepare it for execution. This version of the load() method * creates an <code>XsltTransformer</code> which offers interfaces for stylesheet * invocation corresponding to those described in the XSLT 2.0 specification. It can be used * with XSLT 2.0 or XSLT 3.0 stylesheets, but does not offer new XSLT 3.0 functionality such * as the ability to supply parameters to the initial template, or the ability to invoke * stylesheet-defined functions, or the ability to return an arbitrary sequence as a result * without wrapping it in a document node. If such facilities are required, use the * method {@link #load30()} in preference. * * @return An XsltTransformer. The returned XsltTransformer can be used to set up the * dynamic context for stylesheet evaluation, and to run the stylesheet. */ public XsltTransformer load() { XsltTransformer xt = new XsltTransformer( processor, preparedStylesheet.newController(), preparedStylesheet.getCompileTimeParams()); StructuredQName initialTemplate = preparedStylesheet.getDefaultInitialTemplateName(); if (initialTemplate != null) { xt.setInitialTemplate(new QName(initialTemplate)); } return xt; }
/** * Load the stylesheet to prepare it for execution. This version of the load() method * creates an <code>XsltTransformer</code> which offers interfaces for stylesheet * invocation corresponding to those described in the XSLT 2.0 specification. It can be used * with XSLT 2.0 or XSLT 3.0 stylesheets, but does not offer new XSLT 3.0 functionality such * as the ability to supply parameters to the initial template, or the ability to invoke * stylesheet-defined functions, or the ability to return an arbitrary sequence as a result * without wrapping it in a document node. If such facilities are required, use the * method {@link #load30()} in preference. * * @return An XsltTransformer. The returned XsltTransformer can be used to set up the * dynamic context for stylesheet evaluation, and to run the stylesheet. */ public XsltTransformer load() { XsltTransformer xt = new XsltTransformer( processor, preparedStylesheet.newController(), preparedStylesheet.getCompileTimeParams()); StructuredQName initialTemplate = preparedStylesheet.getDefaultInitialTemplateName(); if (initialTemplate != null) { xt.setInitialTemplate(new QName(initialTemplate)); } return xt; }