/** * Link this package with the packages it uses, to form an executable stylesheet. This process fixes * up any cross-package references to files, templates, and other components, and checks to ensure * that all such references are consistent. * * @return the resulting XsltExecutable * @throws SaxonApiException if any error is found during the linking process, for example * if the constituent packages containing duplicate component names, or if abstract components * are not resolved. */ public XsltExecutable link() throws SaxonApiException { try { Configuration config = processor.getUnderlyingConfiguration(); CompilerInfo info = config.makeCompilerInfo(); Compilation compilation = new Compilation(config, info); stylesheetPackage.checkForAbstractComponents(); PreparedStylesheet pss = new PreparedStylesheet(compilation); stylesheetPackage.updatePreparedStylesheet(pss); pss.addPackage(stylesheetPackage); return new XsltExecutable(processor, pss); } catch (XPathException e) { throw new SaxonApiException(e); } }
/** * Link this package with the packages it uses, to form an executable stylesheet. This process fixes * up any cross-package references to files, templates, and other components, and checks to ensure * that all such references are consistent. * * @return the resulting XsltExecutable * @throws SaxonApiException if any error is found during the linking process, for example * if the constituent packages containing duplicate component names, or if abstract components * are not resolved. */ public XsltExecutable link() throws SaxonApiException { try { Configuration config = getProcessor().getUnderlyingConfiguration(); CompilerInfo info = compiler.getUnderlyingCompilerInfo(); Compilation compilation = new Compilation(config, info); compilation.setPackageData(stylesheetPackage); stylesheetPackage.checkForAbstractComponents(); PreparedStylesheet pss = new PreparedStylesheet(compilation); stylesheetPackage.updatePreparedStylesheet(pss); pss.addPackage(stylesheetPackage); return new XsltExecutable(getProcessor(), pss); } catch (XPathException e) { throw new SaxonApiException(e); } }
pss.addPackage(compilation.getPackageData()); return pss;
pss.addPackage(compilation.getPackageData()); return pss;