• xsltproc docbook 转 html


    /etc/xml/catalog

    <?xml version="1.0" encoding="UTF-8"?>
    
    <catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog" prefer="public" xml:base="file:///etc/xml/docbook-xsl-1.78.1" >
    
    <!-- ............................................................ -->
    <!-- XML Catalog for DocBook .................................... -->
    <!-- File catalog.xml ........................................... -->
    
    <!-- Please direct all questions, bug reports, or suggestions for
    changes to the docbook@lists.oasis-open.org mailing list.
    For more information, see http://www.oasis-open.org/.
    -->
    
    <!-- This is a catalog data file for DocBook. It is provided as a
    convenience in building your own catalog files. You need not
    use the filenames listed here, and need not use the filename
    method of identifying storage objects at all. See the
    documentation for detailed information on the files associated
    with the DocBook DTD. See XML Catalogs at
    http://www.oasis-open.org/committees/entity/ for detailed
    information on supplying and using catalog data.
    -->
    
    <public publicId="-//OASIS//DTD DocBook XML 5.0//EN" uri="dtd/docbook.dtd"/>
    
    <system systemId="http://www.oasis-open.org/docbook/xml/5.0/dtd/docbook.dtd" uri="dtd/docbook.dtd"/>
    
    <system systemId="http://docbook.org/xml/5.0/dtd/docbook.dtd" uri="dtd/docbook.dtd"/>
    
    <uri name="http://www.oasis-open.org/docbook/xml/5.0/rng/docbook.rng" uri="rng/docbook.rng"/>
    
    <uri name="http://docbook.org/xml/5.0/rng/docbook.rng" uri="rng/docbook.rng"/>
    
    <uri name="http://www.oasis-open.org/docbook/xml/5.0/rng/docbookxi.rng" uri="rng/docbookxi.rng"/>
    
    <uri name="http://docbook.org/xml/5.0/rng/docbookxi.rng" uri="rng/docbookxi.rng"/>
    
    <uri name="http://www.oasis-open.org/docbook/xml/5.0/rng/docbook.rnc" uri="rng/docbook.rnc"/>
    
    <uri name="http://docbook.org/xml/5.0/rng/docbook.rnc" uri="rng/docbook.rnc"/>
    
    <uri name="http://www.oasis-open.org/docbook/xml/5.0/rng/docbookxi.rnc" uri="rng/docbookxi.rnc"/>
    
    <uri name="http://docbook.org/xml/5.0/rng/docbookxi.rnc" uri="rng/docbookxi.rnc"/>
    
    <uri name="http://www.oasis-open.org/docbook/xml/5.0/xsd/docbook.xsd" uri="xsd/docbook.xsd"/>
    
    <uri name="http://docbook.org/xml/5.0/xsd/docbook.xsd" uri="xsd/docbook.xsd"/>
    
    <uri name="http://www.oasis-open.org/docbook/xml/5.0/xsd/docbookxi.xsd" uri="xsd/docbookxi.xsd"/>
    
    <uri name="http://docbook.org/xml/5.0/xsd/docbookxi.xsd" uri="xsd/docbookxi.xsd"/>
    
    <uri name="http://www.oasis-open.org/docbook/xml/5.0/xsd/xi.xsd" uri="xsd/xi.xsd"/>
    
    <uri name="http://docbook.org/xml/5.0/xsd/xi.xsd" uri="xsd/xi.xsd"/>
    
    <uri name="http://www.oasis-open.org/docbook/xml/5.0/xsd/xlink.xsd" uri="xsd/xlink.xsd"/>
    
    <uri name="http://docbook.org/xml/5.0/xsd/xlink.xsd" uri="xsd/xlink.xsd"/>
    
    <uri name="http://www.oasis-open.org/docbook/xml/5.0/xsd/xml.xsd" uri="xsd/xml.xsd"/>
    
    <uri name="http://docbook.org/xml/5.0/xsd/xml.xsd" uri="xsd/xml.xsd"/>
    
    <uri name="http://www.oasis-open.org/docbook/xml/5.0/sch/docbook.sch" uri="sch/docbook.sch"/>
    
    <uri name="http://docbook.org/xml/5.0/sch/docbook.sch" uri="sch/docbook.sch"/>
    
    <uri name="http://www.oasis-open.org/docbook/xml/5.0/docbook.nvdl" uri="docbook.nvdl"/>
    
    <uri name="http://docbook.org/xml/5.0/docbook.nvdl" uri="docbook.nvdl"/>
    
    <uri name="docbook.xsl" uri="docbook-xsl-1.78.1/html/docbook.xsl"/>
    
    <!-- End of XML Catalog for DocBook ............................. -->
    <!-- ............................................................ -->
    </catalog>

    下载 docbook-xsl-1.78.1.tar.bz2 解压到 /etc/xml

    parsebook.sh

    #!/bin/bash
    
    export SGML_CATALOG_FILES="/etc/xml/catalog"
    export XML_CATALOG_FILES="/etc/xml/catalog"
    xsltproc --xinclude --catalogs /etc/xml/docbook-xsl-1.78.1/html/docbook.xsl index.dbx > cobarclient.html

     进入 dbx 所在目录 , 执行

    zhenweiliu@CliffyCat:~/Work/Projects/cobarclient/src/docs/docbook/zh$ ./parsebook.sh

    生成 html 书籍完成

  • 相关阅读:
    ACM ICPC 2008–2009 NEERC MSC A, B, C, G, L
    POJ 1088 滑雪 DP
    UVA 11584 最短回文串划分 DP
    POJ 2531 Network Saboteur DFS+剪枝
    UVa 10739 String to Palindrome 字符串dp
    UVa 11151 Longest Palindrome 字符串dp
    UVa 10154 Weights and Measures dp 降维
    UVa 10271 Chopsticks dp
    UVa 10617 Again Palindrome 字符串dp
    UVa 10651 Pebble Solitaire 状态压缩 dp
  • 原文地址:https://www.cnblogs.com/zemliu/p/4018055.html
Copyright © 2020-2023  润新知