Transition to Docbook5.0 series (1)

Source: Internet
Author: User
Tags definition new features

Docbook5.0 has been released for some time, just to use DocBook to write a document, decided to follow the 5.0 standard, simply put 5.0 of some of the new features recorded.

Today, the 5.0 document declaration is different from 4.0, DOCBOOK5 has deprecated the use of DTDs, replaced by RELAX Ng,relax NG (read "relaxing"), a syntax-based XML Schema language that can be used to describe, define, and restrict XML Glossary. Learn about why some people don't like the document type definition (DEFINITION,DTD) and how RELAX ng improves on it. If you want to get a deeper understanding of RELAX ng, you can go to Google to search for a lot of introductory documents .

Here's a comparison of the 4.0 and 5.0 differences in the document declaration, first look at 4.0

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE article PUBLIC '-//OASIS//DTD DocBook XML V4.5//EN'
                          'http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd'>
<article lang="en">
   <title>Sample article</title>
   <para>This is a very short article.</para>
</article>

Here's a new method for 5.0.

<?xml version="1.0" encoding="utf-8"?>
<article xmlns="http://docbook.org/ns/docbook" version="5.0" xml:lang="en">
   <title>Sample article</title>
   <para>This is a very short article.</para>
</article>

Pay attention! 5.0 of the language declaration method adopts standard method xml:lang= "En", this is shorthand method, all write should be xml:lang= "en-us".

The next article describes how to use the new relax NG to validate DocBook.

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.