最新消息:20210816 当前crifan.com域名已被污染,为防止失联,请关注(页面右下角的)公众号

【已解决】给Docbook的基于saxon的ant webhelp中添加catalog支持

Docbook crifan 1914浏览 0评论

有空去参考:

Re: [docbook-apps] Webhelp questions: catalogs and xpointers

下载:denis-webhelp-files.tar

去折腾一下ant webhelp的catalog。

 

以及另外两个参考资料:

XMLCatalog

Exec

 

其实关于给基于saxon的webhelp添加catalog支持,还有另外两个官方的FAQ中的回答:

Sample setup for entity resolution catalog using saxon

Catalogs with Saxon and Sun resolver.

另外,Docbook and Ant也有关于catalog的详细用法举例的。


1.参考:

XMLCatalog

去给E:\Dev_Root\docbook\dev\ant\webhelp\build.xml添加了:

...
    <xmlcatalog id="crl_catalog">
        <dtd 
            publicId="crl.ent"
            location="file:///E:/Dev_Root/docbook/dev/config/entity/crl.ent"/>
    </xmlcatalog>
  
  <target name="chunk" depends="clean">
...
	<xslt
	  in="${input-xml}"
	    out="${xincluded-profiled.xml}"
        style="${xsl-ns-path}/profiling/profile.xsl" classpath="${xercesImpl.jar}">
        
        <xmlcatalog refid="crl_catalog"/>
...

对应的xml中是用的:

<!ENTITY % crl_ent PUBLIC "crl.ent" 'https://www.crifan.com/crl_entity'>%crl_ent;

然后去编译,结果是可以正常编译的,说明catalog集成到ant中,就这么直接的搞定了。

 

【总结】

如果是使用ant的内置的catalog,只需要添加对应的xmlcatalog的配置,然后xslt中再引用,即可实现支持catalog了。


后续关于想要支持外部catalog文件,以支持systemId的折腾过程,参见:

【未解决】Docbook中,让ant支持外部catalog文件,以支持systemId的entity

转载请注明:在路上 » 【已解决】给Docbook的基于saxon的ant webhelp中添加catalog支持

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
82 queries in 0.164 seconds, using 22.37MB memory