有空去参考:
Re: [docbook-apps] Webhelp questions: catalogs and xpointers
去折腾一下ant webhelp的catalog。
以及另外两个参考资料:
XMLCatalog
其实关于给基于saxon的webhelp添加catalog支持,还有另外两个官方的FAQ中的回答:
Sample setup for entity resolution catalog using saxon
Catalogs with Saxon and Sun resolver.
另外,Docbook and Ant也有关于catalog的详细用法举例的。
1.参考:
去给E:\Dev_Root\docbook\dev\ant\webhelp\build.xml添加了:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | ... < xmlcatalog id = "crl_catalog" > < dtd publicId = "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中是用的:
1 | <!ENTITY % crl_ent PUBLIC "crl.ent" 'https://www.crifan.com/crl_entity'>%crl_ent; |
然后去编译,结果是可以正常编译的,说明catalog集成到ant中,就这么直接的搞定了。
【总结】
如果是使用ant的内置的catalog,只需要添加对应的xmlcatalog的配置,然后xslt中再引用,即可实现支持catalog了。
后续关于想要支持外部catalog文件,以支持systemId的折腾过程,参见: