Get the App
SLTechnology News&Howtos  ›  Development  › 

What is the use of DocBook XML in XML mode

Shulou Source: shulou.com Published: 2022-06-03 14:43:05 11月01日 Update

Editor to share with you what is the use of DocBook XML in XML mode, I believe most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!

The ability to document and then create it in many different output formats has been a dream for many development teams for years. This can be achieved through DocBook XML, which not only maintains semantic markup, but also maintains control over data formatting and output. Control semantics can specify the chapters and paragraphs that make up the document. The included items can be further specified in the paragraph. For example, you can kill yourself.

The ability to document and then create it in many different output formats has been a dream for many development teams for years. This can be achieved through DocBook XML, which not only maintains semantic markup, but also maintains control over data formatting and output.

Control semantics can specify the chapters and paragraphs that make up the document. The included items can be further specified in the paragraph. For example, you can put command and function names in separate tags, as shown in listing 8.

Listing 8. Wrap commands and functions with separate tags

The compile takes the source code of the material and builds a new class based on the filename. For example, if the filename isHelloWorld then the name of the class generated will beHelloWorld.

You can choose different output styles and formats when displaying different elements, or you can choose the same style. More importantly, because semantic information is returned (for example, the document may contain a reference to the class name), you can use it to generate a list when writing the index (the list contains all the class names described in detail in the document).

In addition to semantic tags, sections and different parts of a document can also be marked with special ID tags, and these ID can be used to establish links to different parts of the document. Some types can be done automatically (chapters, sections, and other types of generated catalogs), while others need to explicitly establish links to other parts.

These links can be automatically converted to the appropriate format when converted to the target format. For example, this link will be converted to the appropriate HTML page or the anchor link in the page. If you are generating a PDF, you can include the page number of the target chapter.

This transformation is done by XSLT stylesheets. Existing standard DocBook XSLT stylesheets support conversion to standard HTML, XHTML, PDF (through the FO standard), Texinfo, Java ™Help, and Man pages. Using standard stylesheets, you can also convert data into a variety of sizes and styles, books, A4 pages, and slides.

The flexibility of various output formats and tags means that when creating a document, you can use the same document source code to provide printed manuals, embedded help, man pages, online and context-aware information. Using a more traditional model, you can write these elements separately.

The above is all the content of the article "what is the use of DocBook XML in XML mode". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Tags: Documents formats differences semantics output tags styles chapters links pages standards paragraphs parts controls articles generation patterns same appropriate information Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Xiaomi NVidia Linux Microsoft MySQL