我正在使用MorganaXProc IIIse (XPROC 3.0)来执行以下代码:
<p:declare-step xmlns:p="http://www.w3.org/ns/xproc" version="3.0">
<p:output port="result"/>
<p:xslt name="xml-author_list">
<p:with-input port="source">
<p:document href="content.xml"/>
</p:with-input>
<p:with-input port="stylesheet">
<p:document href="test.xsl"/>
</p:with-input>
</p:xslt>
</p:declare-step>但是,我得到以下错误消息:
Check your configuration: Cannot initialize XSLTConnector with 'com.xml_project.morganaxproc3.saxon10connector.Saxon10XSLTConnector'.
<c:errors xmlns:c="http://www.w3.org/ns/xproc-step">
<c:error code="err:XC0038"
name="xml-author_list"
type="p:xslt"
href="file:///Users/bob/Dev/Workspace/IdeaProjects/test/test/test.xpl"
line="4"
column="36"
xmlns:p="http://www.w3.org/ns/xproc"
xmlns:err="http://www.w3.org/ns/xproc-error">
<message>Requested XSLT version '3.0' is not supported by choosen XSLTConnector or XSLTConnector configuration error.</message>
</c:error>
</c:errors>因此,我尝试将XSLTConnector更改为Saxon10。Saxon10Connector已经在摩嘉娜的lib目录中。这是我的config.xml:
<morgana-config xmlns="http://www.xml-project.com/morganaxproc">
<path_to_iso_skeleton_schematron_1>ISO_SKELETON_SCHEMATRON_1</path_to_iso_skeleton_schematron_1>
<path_to_iso_skeleton_schematron_2>ISO_SKELETON_SCHEMATRON_2</path_to_iso_skeleton_schematron_2>
<path_to_SchXSLT_1>schxslt-1.4.5-sources/xslt/1.0</path_to_SchXSLT_1>
<path_to_SchXSLT_2>schxslt-1.4.5-sources/xslt/2.0</path_to_SchXSLT_2>
<XSLTValidationMode>STRICT</XSLTValidationMode>
<xslt-connector>Saxon10</xslt-connector>
</morgana-config>然后我执行:
sh Morgana.sh /Users/bob/Dev/Workspace/IdeaProjects/test/test/test.xpl -xslt-connector=saxon10 -xquery-connector=saxon10 -indent-errors -debug但是错误仍然会发生。我找不到任何有关XSLTConnector支持XSL-Stylesheet heet3.0版的信息
任何提示都是非常感谢的。
发布于 2021-10-12 10:45:31
如果你阅读documentation,它会说:
当前对Saxon实现的搜索顺序是saxon9ee.jar、saxon9pe.jar、saxon9he.jar、saxon-ee-10.0.jar、saxon-pe-10.0.jar、saxon-he-10.0.jar、saxon-ee-10.1.jar、saxon-pe-10.1.jar和saxon-he-10.1.jar。MorganaXProc IIIse将使用此搜索顺序找到的第一个Saxon版本。
但是由于Saxon 10的推荐Saxon版本是Saxon 10.3:
建议在Saxon10.3中使用
人们可以假设它将与10.3以及任何新版本一起工作。
然而,在10.3和10.6版本中,我仍然得到了相同的错误。我假设lib文件夹中可能有一个Saxon 9.x版本,因此根据搜索顺序选择了错误的版本。但事实并非如此。
当我像搜索顺序中提到的那样添加10.0时,它就起作用了。
https://stackoverflow.com/questions/69537410
复制相似问题