0

我尝试使用带有 Saxon 和 XML 目录的 Xerces2J 将我的 DTD 从旧位置重定向到新位置。但我总是遇到这个错误:

Parse catalog: C:/temp/catalog.xml
Loading catalog: C:/temp/catalog.xml
Default BASE: file:C:/temp/catalog.xml
override: no
OVERRIDE: no
rewriteURI: file:///zfhpsys
    file:///X:/z186485_hpsys_pa_cr113019_revision_tracking/zfhpsys
REWRITE_URI: file:///zfhpsys
    file:/X:/z186485_hpsys_pa_cr113019_revision_tracking/zfhpsys
rewriteURI: /
    file:///X:/z186485_hpsys_pa_cr113019_revision_tracking/
REWRITE_URI: /
    file:/X:/z186485_hpsys_pa_cr113019_revision_tracking/
rewriteSystem: /zfhpsys
    file:///X:/z186485_hpsys_pa_cr113019_revision_tracking/zfhpsys
REWRITE_SYSTEM: /zfhpsys
    file:/X:/z186485_hpsys_pa_cr113019_revision_tracking/zfhpsys
Failure reading file:
/X:/z186485_hpsys_pa_cr113019_revision_tracking/zfhpsys/tool_int/software_doku/dokusystem/serna/plugin/software_doku/example/revisons2.xml: 
\zfhpsys\tool_int\software_doku\dokusystem\epic\custom\doctypes\XMLBlock\XMLBlock.dtd 
(File not found)

所以替换不起作用。这是我的目录.xml:

<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE catalog PUBLIC "-//OASIS//DTD XML Catalogs V1.0//EN" "http://www.oasis-    open.org/committees/entity/release/1.0/catalog.dtd">
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog"  prefer="system">  
 <rewriteSystem systemIdStartString="/zfhpsys"    rewritePrefix="file:///X:/z186485_hpsys_pa_cr113019_revision_tracking/zfhpsys"/>
 <rewriteURI    uriStartString="file:///zfhpsys"  rewritePrefix="file:///X:/z186485_hpsys_pa_cr113019_revision_tracking/zfhpsys"/> 
 <rewriteURI    uriStartString="/"                rewritePrefix="file:///X:/z186485_hpsys_pa_cr113019_revision_tracking/"/>
</catalog>

这是 XML 文件:

<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE XMLBlock SYSTEM "/zfhpsys/tool_int/software_doku/dokusystem/epic/custom/doctypes/XMLBlock/XMLBlock.dtd" [
<!ENTITY csv SYSTEM "/zfhpsys/tool_int/software_doku/dokusystem/serna/plugin/software_doku/example/sample_config.csv">]>
<XMLBlock DocID="bla">
  <Title if="(TEST)">Doc Name</Title>
  <Description>
    <Heading>[1.1] EDIT description</Heading>
    <Content if="(CANCEL_BUTTON)">Er hörte leise Schritte hinter sich. </Content>
  </Description>
</XMLBlock>

至少 CatalogManager.properties:

 catalogs=C:/temp/catalog.xml
 relative-catalogs=false
 static-catalog=no
 catalog-class-name=org.apache.xml.resolver.Resolver
 verbosity=10

所以日志告诉我目录已经被读取,但是SYSTEM没有被替换。我做错了什么?

此致

马库斯

4

1 回答 1

0

我刚刚添加(对于 Windows)

<rewriteURI uriStartString="file:/zfhpsys" rewritePrefix="file:///X:/z186485_hpsys_pa_cr113019_revision_track/zfhpsys" />

感谢 Michael Kay、Dave Pawson、Jirka Kosek 和 George Bina。

于 2014-12-08T12:30:42.503 回答