家庭版到企业版使用TransformerFactory
Using TransformerFactory from Home Edition to Enterprise Edition
我正在使用一个格式化引擎,之前我在其中使用了 saxon9he.jar,其中我使用的配置是“
private static TransformerFactory theTransformerFactory =
TransformerFactory.newInstance();
((TransformerFactoryImpl) theTransformerFactory).getConfiguration();
现在我想使用EnterpriseEdition
saxon9ee.jar 并且我想使用EnterpriseTransformerFactory
来获取配置。我可以用这个吗?或者我需要为引擎中的 Homedition 切换 EnterpriseEdition
做哪些更改?
Saxon-EE 的 EnterpriseTransformerFactory
和 EnterpriseConfiguration
是 Saxon-HE 的 TransformerFactoryImpl
和 Configuration
的子类,因此您应该能够以完全相同的方式使用它们无需更改您的应用程序。当然,要获得任何好处,您需要 (a) 安装许可证文件,and/or (b) 更改您的代码以利用新功能。
我正在使用一个格式化引擎,之前我在其中使用了 saxon9he.jar,其中我使用的配置是“
private static TransformerFactory theTransformerFactory =
TransformerFactory.newInstance();
((TransformerFactoryImpl) theTransformerFactory).getConfiguration();
现在我想使用EnterpriseEdition
saxon9ee.jar 并且我想使用EnterpriseTransformerFactory
来获取配置。我可以用这个吗?或者我需要为引擎中的 Homedition 切换 EnterpriseEdition
做哪些更改?
Saxon-EE 的 EnterpriseTransformerFactory
和 EnterpriseConfiguration
是 Saxon-HE 的 TransformerFactoryImpl
和 Configuration
的子类,因此您应该能够以完全相同的方式使用它们无需更改您的应用程序。当然,要获得任何好处,您需要 (a) 安装许可证文件,and/or (b) 更改您的代码以利用新功能。