| 1 | <?xml version='1.0' encoding="UTF-8"?> |
1 | <?xml version='1.0' encoding="UTF-8"?> |
| 2 | <!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/xml-guide.xml,v 1.24 2003/12/12 14:24:49 swift Exp $ --> |
2 | <!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/xml-guide.xml,v 1.25 2004/02/09 19:25:39 swift Exp $ --> |
| 3 | <!DOCTYPE guide SYSTEM "/dtd/guide.dtd"> |
3 | <!DOCTYPE guide SYSTEM "/dtd/guide.dtd"> |
| 4 | |
4 | |
| 5 | <guide link="/doc/en/xml-guide.xml"> |
5 | <guide link="/doc/en/xml-guide.xml"> |
| 6 | <title>Gentoo Linux XML Guide</title> |
6 | <title>Gentoo Linux XML Guide</title> |
| 7 | |
7 | |
| … | |
… | |
| 12 | John P. Davis |
12 | John P. Davis |
| 13 | </author> |
13 | </author> |
| 14 | <author title="Editor"> |
14 | <author title="Editor"> |
| 15 | <mail link="peesh@gentoo.org">Jorge Paulo</mail> |
15 | <mail link="peesh@gentoo.org">Jorge Paulo</mail> |
| 16 | </author> |
16 | </author> |
|
|
17 | <author title="Editor"> |
|
|
18 | <mail link="swift@gentoo.org">Sven Vermeulen</mail> |
|
|
19 | </author> |
| 17 | |
20 | |
| 18 | <license/> |
21 | <license/> |
|
|
22 | |
| 19 | <abstract> |
23 | <abstract> |
| 20 | This guide shows you how to compose web documentation using the new lightweight |
24 | This guide shows you how to compose web documentation using the new lightweight |
| 21 | Gentoo GuideXML syntax. This syntax is the official format for Gentoo Linux |
25 | Gentoo GuideXML syntax. This syntax is the official format for Gentoo Linux |
| 22 | documentation, and this document itself was created using GuideXML. This guide |
26 | documentation, and this document itself was created using GuideXML. This guide |
| 23 | assumes a basic working knowledge of XML and HTML. |
27 | assumes a basic working knowledge of XML and HTML. |
| 24 | </abstract> |
28 | </abstract> |
| 25 | |
29 | |
| 26 | <version>2.6</version> |
30 | <version>2.7</version> |
| 27 | <date>December 12, 2003</date> |
31 | <date>February 9, 2004</date> |
| 28 | |
32 | |
| 29 | <chapter> |
33 | <chapter> |
| 30 | <title>Guide basics</title> |
34 | <title>Guide basics</title> |
| 31 | <section> |
35 | <section> |
| 32 | <title>Guide XML design goals</title> |
36 | <title>Guide XML design goals</title> |
| … | |
… | |
| 74 | XML document: |
78 | XML document: |
| 75 | </p> |
79 | </p> |
| 76 | |
80 | |
| 77 | <pre caption="The initial part of a guide XML document"> |
81 | <pre caption="The initial part of a guide XML document"> |
| 78 | <?xml version='1.0' encoding="UTF-8"?> |
82 | <?xml version='1.0' encoding="UTF-8"?> |
|
|
83 | <!DOCTYPE guide SYSTEM "/dtd/guide.dtd"> |
| 79 | <guide link="relative_link_to_your_guide"> |
84 | <guide link="relative_link_to_your_guide"> |
| 80 | <title><i>Gentoo Linux Documentation Guide</i></title> |
85 | <title><i>Gentoo Linux Documentation Guide</i></title> |
| 81 | <author title="<i>Chief Architect</i>"> |
86 | <author title="<i>Chief Architect</i>"> |
| 82 | <mail link="<i>drobbins@gentoo.org</i>"><i>Daniel Robbins</i></mail> |
87 | <mail link="<i>drobbins@gentoo.org</i>"><i>Daniel Robbins</i></mail> |
| 83 | </author> |
88 | </author> |
| … | |
… | |
| 578 | </body> |
583 | </body> |
| 579 | </section> |
584 | </section> |
| 580 | </chapter> |
585 | </chapter> |
| 581 | |
586 | |
| 582 | <chapter> |
587 | <chapter> |
|
|
588 | <title>Handbook Format</title> |
|
|
589 | <section> |
|
|
590 | <title>Guide vs Book</title> |
|
|
591 | <body> |
|
|
592 | |
|
|
593 | <p> |
|
|
594 | For high-volume documentation, such as the <uri |
|
|
595 | link="/doc/en/handbook/handbook.xml?part=1">Installation Instructions</uri>, a |
|
|
596 | broader format was needed. We designed a GuideXML-compatible enhancement that |
|
|
597 | allows us to write modular and multi-page documentation. |
|
|
598 | </p> |
|
|
599 | |
|
|
600 | </body> |
|
|
601 | </section> |
|
|
602 | <section> |
|
|
603 | <title>Main File</title> |
|
|
604 | <body> |
|
|
605 | |
|
|
606 | <p> |
|
|
607 | The first change is the need for a "master" document. This document contains no |
|
|
608 | real content, but links to the individual documentation modules. The syntaxis |
|
|
609 | doesn't differ much from GuideXML: |
|
|
610 | </p> |
|
|
611 | |
|
|
612 | <pre caption="Example book usage"> |
|
|
613 | <?xml version='1.0' encoding='UTF-8'?> |
|
|
614 | <!DOCTYPE book SYSTEM "/dtd/book.dtd"> |
|
|
615 | |
|
|
616 | <<i>book</i> link="example.xml"> |
|
|
617 | <title>Example Book Usage</title> |
|
|
618 | |
|
|
619 | <author...> |
|
|
620 | ... |
|
|
621 | </author> |
|
|
622 | |
|
|
623 | <abstract> |
|
|
624 | ... |
|
|
625 | </abstract> |
|
|
626 | |
|
|
627 | <!-- The content of this document is licensed under the CC-BY-SA license --> |
|
|
628 | <!-- See http://creativecommons.org/licenses/by-sa/1.0 --> |
|
|
629 | <license/> |
|
|
630 | |
|
|
631 | <version>...</version> |
|
|
632 | <date>...</date> |
|
|
633 | </pre> |
|
|
634 | |
|
|
635 | <p> |
|
|
636 | So far no real differences (except for the <c><book></c> instead of |
|
|
637 | <c><guide></c> tag). Instead of starting with the individual |
|
|
638 | <c><chapter></c>'s, you define a <c><part></c>, which is the |
|
|
639 | equivalent of a separate part in a book: |
|
|
640 | </p> |
|
|
641 | |
|
|
642 | <pre caption="Defining a part"> |
|
|
643 | <part> |
|
|
644 | <title>Part One</title> |
|
|
645 | <abstract> |
|
|
646 | ... |
|
|
647 | </abstract> |
|
|
648 | |
|
|
649 | <comment>(Defining the several chapters)</comment> |
|
|
650 | </part> |
|
|
651 | </pre> |
|
|
652 | |
|
|
653 | <p> |
|
|
654 | Each part is accompanied by a <c><title></c> and an |
|
|
655 | <c><abstract></c> which gives a small introduction to the part. |
|
|
656 | </p> |
|
|
657 | |
|
|
658 | <p> |
|
|
659 | Inside each part, you define the individual <c><chapter></c>'s. Each |
|
|
660 | chapter <e>must</e> be a separate document. As a result it is no surprise that a |
|
|
661 | special tag (<c><include></c>) is added to allow including the separate |
|
|
662 | document. |
|
|
663 | </p> |
|
|
664 | |
|
|
665 | <pre caption="Defining a chapter"> |
|
|
666 | <chapter> |
|
|
667 | <title>Chapter One</title> |
|
|
668 | <abstract> |
|
|
669 | This is a small explanation on chapter one. |
|
|
670 | </abstract> |
|
|
671 | |
|
|
672 | <include href="path/to/chapter-one.xml"/> |
|
|
673 | |
|
|
674 | </chapter> |
|
|
675 | </pre> |
|
|
676 | |
|
|
677 | </body> |
|
|
678 | </section> |
|
|
679 | <section> |
|
|
680 | <title>Designing the Individual Chapters</title> |
|
|
681 | <body> |
|
|
682 | |
|
|
683 | <p> |
|
|
684 | The content of an individual chapter is structured as follows: |
|
|
685 | </p> |
|
|
686 | |
|
|
687 | <pre caption="Chapter Syntax"> |
|
|
688 | <?xml version='1.0' encoding='UTF-8'?> |
|
|
689 | <!DOCTYPE sections SYSTEM "/dtd/book.dtd"> |
|
|
690 | |
|
|
691 | <!-- The content of this document is licensed under the CC-BY-SA license --> |
|
|
692 | <!-- See http://creativecommons.org/licenses/by-sa/1.0 --> |
|
|
693 | |
|
|
694 | <sections> |
|
|
695 | |
|
|
696 | <comment>(Define the several <section> and <subsection>)</comment> |
|
|
697 | |
|
|
698 | </sections> |
|
|
699 | </pre> |
|
|
700 | |
|
|
701 | <p> |
|
|
702 | Inside each chapter you can define <c><section></c>'s (equivalent of |
|
|
703 | <c><chapter></c> in a Guide) and <c><subsection></c>'s (equivalent |
|
|
704 | of <c><section></c> in a Guide). |
|
|
705 | </p> |
|
|
706 | |
|
|
707 | </body> |
|
|
708 | </section> |
|
|
709 | </chapter> |
|
|
710 | |
|
|
711 | <chapter> |
| 583 | <title>Resources</title> |
712 | <title>Resources</title> |
| 584 | <section> |
713 | <section> |
| 585 | <title>Start writing</title> |
714 | <title>Start writing</title> |
| 586 | <body> |
715 | <body> |
| 587 | |
716 | |