Initial knowledge of DocBook (Tools for writing technical documents)

Source: Internet
Author: User
Tags naming convention svn xsl zip

Suddenly you see a bunch of commands under Linux:

[Root@localhost default]# do
Do docbook2rtf docbook2txt dosfsck doveconf Doxytag
docbook2html Docbook2tex DomainName Dosfslabel Dovecot
Docbook2man Docbook2texi Done Doveadm Doxygen
[Root@localhost default]# man Docbook2txt

Immediately Baidu DocBook of the relevant information.

DocBook is a document tool that is especially suitable for use by technicians for document writing. It's too early to know that this stuff, like the good tools of Visio and project, is like the artifact in the martial arts world, but this artifact is available to everyone but not everyone knows.


The following content is reproduced from http://blog.sina.com.cn/s/blog_517d1cb00100uqcv.html

Responsible for building an environment called Autodoc to help developers collaborate on writing technical documents and generating various types of output (e.g. HTML, PDF, RTF, etc.).
Autodoc is based on DocBook and FOP, Ant, Ant-contrib, Maven, Hudson, SVN and other technologies and open source projects.

Autodoc's overall architecture diagram:


I will not dwell on the installation and configuration of Hudson,maven and SVN. Please refer to the official documentation.

We need to create a project for Autodoc in Eclipse and then import other dependent components. Here are the resources used by Autodoc:
docbook-5.0 docbook-xsl-ns-1.76.1 fop-1.0 ant-contrib Ant
(Recommended to use downthemall! download)
Note: apache-ant-1.7.* needs to be run with Java 1.6. For other versions, see Release Notes.

Here's a brief introduction to the files that each component needs to import:
docbook-5.0: You only need to import the Docbook.dtd file. docbook-xsl-ns-1.76.1: Import all files. fop-1.0: Import all the jar files in the build and Lib folders. Ant-contrib: Import all the jar files under the Ant-contrib-1.0b3.jar and Lib folders under the root directory. The process of importing:
Select Project, right-click Import ... In the Import dialog window, fill in the "Archive" into the "Select an import source" text box, then select the "Archive File" node, click "Next" click "Browser ..." to select the corresponding zip file, such as "d:\ Download\docbook-5.0.zip ". Click "File Types ..." and select the extension of the target file in the "Select Types" dialog window, such as "*.dtd" and click "OK". Click the organization chart for the "Finish" source file (XML file based on the DocBook DTD and other related files):


The reasons for adopting this organizational structure are:
Easy to organize and manage documents as well as document snippets and images inserted in documents
The build process is more complex:
If the Temp folder exists, delete
Copy the files under the SRC folder to the Temp folder (except for export files, such as *.pdf,*.html, etc.)
Delete XML directives and DOCTYPE directives in the subordinate file (partition source files) (Replace with spaces)
Replace the DTD path in the main file with the common path (configured in the Build.properties file)
Scan the Temp folder and its subfolders for all XML files that conform to the naming convention-"*main.xml" (that is, the master file) to process the main file, export the *.fo file based on the *.fo file, export *.pdf file, and *.rtf file export *. The HTML file (the absolute path to the modified picture file is a relative path-so that the picture is displayed properly both locally and in the Web server), the rest of the work is to learn DocBook DTD and DocBook xsl. Based on this, developer can write, modify and manage technical documents, and achieve "write once, read casually".

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.