{"id":1294,"date":"2022-12-26T23:50:10","date_gmt":"2022-12-26T15:50:10","guid":{"rendered":"https:\/\/www.iotot.com\/?p=1294"},"modified":"2022-12-26T23:50:10","modified_gmt":"2022-12-26T15:50:10","slug":"%e4%bd%bf%e7%94%a8-apache-fop-2-3-docbook-xsl-ns-1-79-1-%e8%bd%ac%e6%8d%a2-docbook-5-1-%e6%a0%bc%e5%bc%8f%e7%9a%84-xml-%e6%96%87%e6%a1%a3%e6%88%90-pdf-rtf-%e6%96%87%e4%bb%b6","status":"publish","type":"post","link":"https:\/\/blog.iotot.com\/?p=1294","title":{"rendered":"\u4f7f\u7528 Apache FOP 2.3 + docbook-xsl-ns-1.79.1 \u8f6c\u6362 Docbook 5.1 \u683c\u5f0f\u7684 XML \u6587\u6863\u6210 PDF\/RTF \u6587\u4ef6"},"content":{"rendered":"<p>\u4f7f\u7528 Apache FOP 2.3 + docbook-xsl-ns-1.79.1 \u8f6c\u6362 Docbook 5.1 \u683c\u5f0f\u7684 XML \u6587\u6863\u6210 PDF\/RTF \u6587\u4ef6<\/p>\n<p>\u4f7f\u7528 Docbook \u7f16\u5199\u6298\u6842\u6253\u5370\u5e73\u53f0\u7cfb\u7edf\u3001\u6298\u6842\u4e0a\u4f20\u5e73\u53f0\u7cfb\u7edf\u7684\u4ea7\u54c1\u6587\u6863\uff0c\u539f\u56e0\u57fa\u4e8e\u5982\u4e0b\u4e24\u70b9:<\/p>\n<p>\u7b2c\u4e00\uff0c\u6587\u6863\u7684\u4e0d\u540c\u7ae0\u8282\uff0c\u53ef\u4f7f\u7528\u4e0d\u540c\u7684 .xml \u6587\u4ef6\uff0c\u7531\u4e0d\u540c\u4eba\u5458\u5206\u522b\u64b0\u5199\uff0c\u56fe\u7247\u6587\u4ef6\u5728XML\u6587\u7ae0\u4e2d\u7528\u76f8\u5bf9\u76ee\u5f55\u65b9\u5f0f\u6307\u5b9a\uff0c\u6700\u540e\u7528\u4e00\u4e2a DOS \u547d\u4ee4\u5373\u53ef\u7ec4\u88c5\u751f\u6210\u5927 PDF \u6587\u4ef6\u3002<br \/>\n\u7b2c\u4e8c\uff0c\u6587\u7ae0\u5185\u5bb9\u5206\u6563\u5728 .xml \u6587\u4ef6\u4e2d\uff0c\u89e3\u51b3 SVN \u53ef\u8ddf\u8e2a\u5404\u6b21\u4fee\u6539\u7684\u5185\u5bb9\u3002<br \/>\n\u7b2c\u4e09\uff0c\u5404\u7ae0\u8282\u7684\u683c\u5f0f\uff0c\u4f7f\u7528\u4e00\u4e2a .xsl \u6587\u4ef6\uff0c\u5373\u53ef\u7edf\u4e00\u6587\u6863\u98ce\u683c\u3002\u7ae0\u8282\u7f16\u53f7\u5728\u7ec4\u88c5\u65f6\u81ea\u52a8\u751f\u6210(\u8fd9\u4e2a\u529f\u80fd\u8c8c\u4f3c word \u4e5f\u6709\uff0c\u53ea\u662f\u4e0d\u540c\u5927\u7ae0\u8282\u91cc\u7684\u5c0f\u7ae0\u8282\u987a\u5e8f\u53f7\u6709\u65f6\u9519\u8bef\u9700\u8981\u4eba\u5de5\u8c03\u6574)\u3002<\/p>\n<p>\u5927\u7684 Word \u6587\u4ef6\u96be\u6539\uff0c\u75db\u70b9\u5927\u5bb6\u90fd\u77e5\u9053:<\/p>\n<p>\u5728\u5927\u6587\u4ef6\u91cc\u6539\u51e0\u884c\u5b57\uff0c\u6253\u5f00\u6162\u3001\u4fdd\u5b58\u6162\uff1b<\/p>\n<p>\u5982\u679c\u8981\u4fdd\u7559\u4fee\u6539\u524d\u7684\u5907\u4efd\uff0c\u6587\u4ef6\u4e5f\u5f88\u5927\u3002<\/p>\n<p>&nbsp;<\/p>\n<p>Docbook \u683c\u5f0f\u7684\u6587\u6863\uff0c\u4f7f\u7528 XML \u683c\u5f0f\uff0c\u5404\u4e2a XML node \u7684\u540d\u5b57\u4e5f\u5f88\u8bed\u4e49\u5316\uff0c\u57fa\u672c\u4e0a\u770b\u4e0a\u53bb\u5c31\u61c2\u3002\u51e0\u4e2a\u4e3b\u8981 XML node \u4ece\u5927\u5230\u5c0f\u4e3a:<\/p>\n<p>book(\u4e66), chapter(\u7ae0), section(\u8282), para (\u6bb5\u843d) \u3002<\/p>\n<p>section(\u8282)\u53ef\u4ee5\u6709\u591a\u4e2a\u5c42\u6b21\uff0c\u6bd4\u5982 sect1, sect2, sect3, sect4,sect5 \u3002<\/p>\n<p>\u73af\u5883\u642d\u5efa:<br \/>\na. \u4e0b\u8f7d docbook \u8f6c\u6362\u6240\u7528\u6837\u5f0f xsl:<br \/>\nhttps:\/\/sourceforge.net\/projects\/docbook\/files\/docbook-xsl-ns\/1.79.1\/ \u91cc\u7684\u6587\u4ef6: docbook-xsl-ns-1.79.1.zip<\/p>\n<p>b. \u89e3\u538b\u7f29 docbook-xsl-ns-1.79.1.zip \u5230 c:\\my_apps\\docbook-xsl-ns-1.79.1 \uff0c\u76ee\u5f55\u7ed3\u6784\u4e3a:<br \/>\nC:\\my_apps\\docbook-xsl-ns-1.79.1\\README<br \/>\nC:\\my_apps\\docbook-xsl-ns-1.79.1\\fo\\docbook.xsl<br \/>\n&#8230;<\/p>\n<p>c. \u4e0b\u8f7d docbook \u8f6c\u6362\u6240\u7528\u5de5\u5177 Apache FOP:<br \/>\nhttps:\/\/xmlgraphics.apache.org\/fop\/download.html \u91cc\u7684 fop-2.3-bin.tar.gz \u6216 fop-2.3-bin.zip<\/p>\n<p>d. \u89e3\u538b\u7f29 fop-2.3-bin.tar.gz \u5230 c:\\my_apps\\fop-2.3 \uff0c\u76ee\u5f55\u7ed3\u6784\u4e3a:<br \/>\nC:\\my_apps\\fop-2.3\\README<br \/>\nc:\\my_apps\\fop-2.3\\fop\\fop.bat<\/p>\n<p>&#8230;<\/p>\n<p>\u5c06 c:\\my_apps\\fop-2.3\\fop\\ \u8bbe\u7f6e\u5230 windows path \u8def\u5f84\u4e2d(\u63a7\u5236\u9762\u677f\\\u7cfb\u7edf\u548c\u5b89\u5168\\\u7cfb\u7edf, \u9ad8\u7ea7\u7cfb\u7edf\u8bbe\u7f6e, \u9ad8\u7ea7\uff0c\u73af\u5883\u53d8\u91cf\uff0c\u7cfb\u7edf\u53d8\u91cf\uff0cpath, )\uff0c\u540e\u7eed\u53ef\u65b9\u4fbf\u4f7f\u7528\uff1aC:\\my_apps\\fop-2.3\\fop\\fop.bat<\/p>\n<p>e. \u5982\u679c C: \u76d8\u7a7a\u95f4\u4e0d\u8db3\uff0c\u53ef\u5c06\u4e0a\u8ff0\u6587\u4ef6\u653e\u5728 D:\\my_apps\uff0c\u7136\u540e\u5f00\u4e00\u4e2a\u7ba1\u7406\u5458\u6743\u9650\u7684 DOS \u7a97\u53e3\uff0c\u8fdb\u884c\u6620\u5c04\u76ee\u5f55:<br \/>\nmklink \/d c:\\my_apps D:\\my_apps<\/p>\n<p>f. \u4e0b\u8f7d\u5e76\u5b89\u88c5 Java \u8fd0\u884c\u652f\u6301\u5e93(JRE, \u6216 JDK).<br \/>\nApache FOP \u8fd0\u884c\u9700\u8981 Java.<\/p>\n<p>g.\u00a0 \u5728\u67d0\u4e2a\u6587\u4ef6\u76ee\u5f55\uff0c\u6bd4\u5982 C:\\projects\\zhegui_print_upload\\050-Deploy-docs\uff0c\u65b0\u5efa xlst \u6587\u4ef6 installation-zg_prt_uld-book.xsl\uff0c\u5f15\u7528\u5df2\u6709\u7684 docbook.xsl\uff0c\u5e76\u52a0\u4e0a\u4e00\u4e9b\u5b9a\u5236\u5316\u53c2\u6570\uff0c\u6bd4\u5982\u4e2d\u82f1\u6587\u4f7f\u7528\u4e0d\u540c\u7684\u5b57\u4f53\u3002<br \/>\n&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br \/>\n\u4f7f\u7528 Apache FOP 2.3 + docbook-xsl-ns-1.79.1 \u8f6c\u6362 Docbook 5.1 \u683c\u5f0f\u7684 XML \u6587\u6863\u6210 PDF\/RTF \u6587\u4ef6<br \/>\nhttps:\/\/blog.51cto.com\/u_15127572\/2765809<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4f7f\u7528 Apache FOP 2.3 + docbook-xsl-ns-1.79.1 \u8f6c\u6362 Docbook 5. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/blog.iotot.com\/index.php?rest_route=\/wp\/v2\/posts\/1294"}],"collection":[{"href":"https:\/\/blog.iotot.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.iotot.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.iotot.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.iotot.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1294"}],"version-history":[{"count":1,"href":"https:\/\/blog.iotot.com\/index.php?rest_route=\/wp\/v2\/posts\/1294\/revisions"}],"predecessor-version":[{"id":1295,"href":"https:\/\/blog.iotot.com\/index.php?rest_route=\/wp\/v2\/posts\/1294\/revisions\/1295"}],"wp:attachment":[{"href":"https:\/\/blog.iotot.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1294"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.iotot.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1294"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.iotot.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1294"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}