问题
I'm trying to upgrade Saxonica PE from 9.6.0.8 to 9.7.0.4 but can't proceed until I find a suitable replacement for StylesheetPackager. I've looked but haven't found anything yet. The class went missing in 9.7.0.1.
回答1:
We completely redesigned the mechanism for stylesheet packaging in 9.7. Exporting a stylesheet now works at the level of a "package" rather than a complete stylesheet (though it can be a complete stylesheet of course), and the export file contains an encoding of the compiled stylesheet rather than the source. From the command line, you can use -export:filename to export the compiled stylesheet to a file; the file is an XML file using an internal-to-Saxon vocabulary, and it can be loaded anywhere you would use a source stylesheet, e.g. as the -xsl: option to the Transform command (Saxon recognizes whether the XML file contains source XSLT or compiled XSLT). Stylesheet packages can also be imported and exported using methods in the s9api API.
More details here:
http://www.saxonica.com/documentation/index.html#!using-xsl/compiling
来源:https://stackoverflow.com/questions/37124397/what-happened-to-com-saxonica-ptree-stylesheetpackager-in-saxonica-9-7-0-4