| 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.48 2005/08/11 11:01:06 swift Exp $ --> |
2 | <!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/xml-guide.xml,v 1.49 2005/08/23 09:18:12 neysx 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 | |
| 8 | <author title="Author"> |
8 | <author title="Author"> |
| 9 | <mail link="drobbins@gentoo.org">Daniel Robbins</mail> |
9 | <mail link="drobbins@gentoo.org">Daniel Robbins</mail> |
| 10 | </author> |
10 | </author> |
| 11 | <author title="Author"><!-- zhen@gentoo.org --> |
11 | <author title="Author"><!-- zhen@gentoo.org --> |
| 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"> |
17 | <author title="Editor"> |
| … | |
… | |
| 20 | <author title="Editor"> |
20 | <author title="Editor"> |
| 21 | <mail link="neysx@gentoo.org">Xavier Neys</mail> |
21 | <mail link="neysx@gentoo.org">Xavier Neys</mail> |
| 22 | </author> |
22 | </author> |
| 23 | |
23 | |
| 24 | <abstract> |
24 | <abstract> |
| 25 | This guide shows you how to compose web documentation using the new lightweight |
25 | This guide shows you how to compose web documentation using the new lightweight |
| 26 | Gentoo GuideXML syntax. This syntax is the official format for Gentoo Linux |
26 | Gentoo GuideXML syntax. This syntax is the official format for Gentoo Linux |
| 27 | documentation, and this document itself was created using GuideXML. This guide |
27 | documentation, and this document itself was created using GuideXML. This guide |
| 28 | assumes a basic working knowledge of XML and HTML. |
28 | assumes a basic working knowledge of XML and HTML. |
| 29 | </abstract> |
29 | </abstract> |
| 30 | |
30 | |
| 31 | <!-- The content of this document is licensed under the CC-BY-SA license --> |
31 | <!-- The content of this document is licensed under the CC-BY-SA license --> |
| 32 | <!-- See http://creativecommons.org/licenses/by-sa/2.5 --> |
32 | <!-- See http://creativecommons.org/licenses/by-sa/2.5 --> |
| 33 | <license/> |
33 | <license/> |
| 34 | |
34 | |
| 35 | <version>2.24</version> |
35 | <version>2.25</version> |
| 36 | <date>2005-08-11</date> |
36 | <date>2005-08-23</date> |
| 37 | |
37 | |
| 38 | <chapter> |
38 | <chapter> |
| 39 | <title>Guide basics</title> |
39 | <title>Guide basics</title> |
| 40 | <section> |
40 | <section> |
| 41 | <title>Guide XML design goals</title> |
41 | <title>Guide XML design goals</title> |
| 42 | <body> |
42 | <body> |
| 43 | |
43 | |
| 44 | <p> |
44 | <p> |
| 45 | The guide XML syntax is lightweight yet expressive, so that it is easy to |
45 | The guide XML syntax is lightweight yet expressive, so that it is easy to |
| 46 | learn yet also provides all the features we need for the creation of web |
46 | learn yet also provides all the features we need for the creation of web |
| 47 | documentation. The number of tags is kept to a minimum -- just those we need. |
47 | documentation. The number of tags is kept to a minimum -- just those we need. |
| 48 | This makes it easy to transform guide into other formats, such as DocBook |
48 | This makes it easy to transform guide into other formats, such as DocBook |
| 49 | XML/SGML or web-ready HTML. |
49 | XML/SGML or web-ready HTML. |
| 50 | </p> |
50 | </p> |
| 51 | |
51 | |
| … | |
… | |
| 77 | <title>Basic structure</title> |
77 | <title>Basic structure</title> |
| 78 | <body> |
78 | <body> |
| 79 | |
79 | |
| 80 | <p> |
80 | <p> |
| 81 | Let's start learning the GuideXML syntax. We'll start with the the initial |
81 | Let's start learning the GuideXML syntax. We'll start with the the initial |
| 82 | tags used in a GuideXML document: |
82 | tags used in a GuideXML document: |
| 83 | </p> |
83 | </p> |
| 84 | |
84 | |
| 85 | <pre caption="The initial part of a guide XML document"> |
85 | <pre caption="The initial part of a guide XML document"> |
| 86 | <?xml version="1.0" encoding="UTF-8"?> |
86 | <?xml version="1.0" encoding="UTF-8"?> |
| 87 | <!DOCTYPE guide SYSTEM "/dtd/guide.dtd"> |
87 | <!DOCTYPE guide SYSTEM "/dtd/guide.dtd"> |
| 88 | <!-- $Header$ --> |
88 | <!-- $Header$ --> |
| 89 | |
89 | |
| 90 | <guide link="<i>/doc/en/guide.xml</i>" lang="<i>en</i>"> |
90 | <guide link="<i>/doc/en/guide.xml</i>" lang="<i>en</i>"> |
| 91 | <title><i>Gentoo Linux Documentation Guide</i></title> |
91 | <title><i>Gentoo Linux Documentation Guide</i></title> |
|
|
92 | |
| 92 | <author title="<i>Author</i>"> |
93 | <author title="<i>Author</i>"> |
| 93 | <mail link="<i>yourname@gentoo.org</i>"><i>Your Name</i></mail> |
94 | <mail link="<i>yourname@gentoo.org</i>"><i>Your Name</i></mail> |
| 94 | </author> |
95 | </author> |
| 95 | |
96 | |
| 96 | <abstract> |
97 | <abstract> |
| 97 | <i>This guide shows you how to compose web documentation using |
98 | <i>This guide shows you how to compose web documentation using |
| 98 | our new lightweight Gentoo GuideXML syntax. This syntax is the official |
99 | our new lightweight Gentoo GuideXML syntax. This syntax is the official |
| 99 | format for Gentoo Linux web documentation, and this document itself was created |
100 | format for Gentoo Linux web documentation, and this document itself was created |
| 100 | using GuideXML.</i> |
101 | using GuideXML.</i> |
| 101 | </abstract> |
102 | </abstract> |
| 102 | |
103 | |
| 103 | <!-- The content of this document is licensed under the CC-BY-SA license --> |
104 | <!-- The content of this document is licensed under the CC-BY-SA license --> |
| 104 | <!-- See http://creativecommons.org/licenses/by-sa/2.5 --> |
105 | <!-- See http://creativecommons.org/licenses/by-sa/2.5 --> |
| 105 | <license/> |
106 | <license/> |
| 106 | |
107 | |
| … | |
… | |
| 146 | current version number, and the current version date (in YYYY-MM-DD format) |
147 | current version number, and the current version date (in YYYY-MM-DD format) |
| 147 | respectively. Dates that are invalid or not in the YYYY-MM-DD format will |
148 | respectively. Dates that are invalid or not in the YYYY-MM-DD format will |
| 148 | appear verbatim in the rendered document. |
149 | appear verbatim in the rendered document. |
| 149 | </p> |
150 | </p> |
| 150 | |
151 | |
| 151 | <p> |
152 | <p> |
| 152 | This rounds out the tags that should appear at the beginning of a guide |
153 | This rounds out the tags that should appear at the beginning of a guide |
| 153 | document. Besides the <c><title></c> and <c><mail></c> tags, these |
154 | document. Besides the <c><title></c> and <c><mail></c> tags, these |
| 154 | tags shouldn't appear anywhere else except immediately inside the |
155 | tags shouldn't appear anywhere else except immediately inside the |
| 155 | <c><guide></c> tag, and for consistency it's recommended (but not |
156 | <c><guide></c> tag, and for consistency it's recommended (but not |
| 156 | required) that these tags appear before the content of the document. |
157 | required) that these tags appear before the content of the document. |
| 157 | </p> |
158 | </p> |
| 158 | |
159 | |
| 159 | <p> |
160 | <p> |
| 160 | Finally we have the <c><license/></c> tag, used to publish the document |
161 | Finally we have the <c><license/></c> tag, used to publish the document |
| 161 | under the <uri link="http://creativecommons.org/licenses/by-sa/2.0/">Creative |
162 | under the <uri link="http://creativecommons.org/licenses/by-sa/2.5/">Creative |
| 162 | Commons - Attribution / Share Alike</uri> license as required by the <uri |
163 | Commons - Attribution / Share Alike</uri> license as required by the <uri |
| 163 | link="/proj/en/gdp/doc/doc-policy.xml">Documentation Policy</uri>. |
164 | link="/proj/en/gdp/doc/doc-policy.xml">Documentation Policy</uri>. |
| 164 | </p> |
165 | </p> |
| 165 | |
166 | |
| 166 | </body> |
167 | </body> |
| 167 | </section> |
168 | </section> |
| 168 | <section> |
169 | <section> |
| 169 | <title>Chapters and sections</title> |
170 | <title>Chapters and sections</title> |
| 170 | <body> |
171 | <body> |
| 171 | |
172 | |
| 172 | <p> |
173 | <p> |
| 173 | Once the initial tags have been specified, you're ready to start adding the |
174 | Once the initial tags have been specified, you're ready to start adding the |
| 174 | structural elements of the document. Guide documents are divided into |
175 | structural elements of the document. Guide documents are divided into |
| 175 | chapters, and each chapter can hold one or more sections. Every chapter and |
176 | chapters, and each chapter can hold one or more sections. Every chapter and |
| 176 | section has a title. Here's an example chapter with a single section, |
177 | section has a title. Here's an example chapter with a single section, |
| … | |
… | |
| 651 | <!DOCTYPE book SYSTEM "/dtd/book.dtd"> |
652 | <!DOCTYPE book SYSTEM "/dtd/book.dtd"> |
| 652 | <!-- $Header$ --> |
653 | <!-- $Header$ --> |
| 653 | |
654 | |
| 654 | <<i>book</i> link="example.xml"> |
655 | <<i>book</i> link="example.xml"> |
| 655 | <title>Example Book Usage</title> |
656 | <title>Example Book Usage</title> |
| 656 | |
657 | |
| 657 | <author...> |
658 | <author...> |
| 658 | ... |
659 | ... |
| 659 | </author> |
660 | </author> |
| 660 | |
661 | |
| 661 | <abstract> |
662 | <abstract> |
| 662 | ... |
663 | ... |
| 663 | </abstract> |
664 | </abstract> |
| 664 | |
665 | |
| 665 | <!-- The content of this document is licensed under the CC-BY-SA license --> |
666 | <!-- The content of this document is licensed under the CC-BY-SA license --> |
| 666 | <!-- See http://creativecommons.org/licenses/by-sa/2.0 --> |
667 | <!-- See http://creativecommons.org/licenses/by-sa/2.5 --> |
| 667 | <license/> |
668 | <license/> |
| 668 | |
669 | |
| 669 | <version>...</version> |
670 | <version>...</version> |
| 670 | <date>...</date> |
671 | <date>...</date> |
| 671 | </pre> |
672 | </pre> |
| 672 | |
673 | |
| 673 | <p> |
674 | <p> |
| 674 | So far no real differences (except for the <c><book></c> instead of |
675 | So far no real differences (except for the <c><book></c> instead of |
| 675 | <c><guide></c> tag). Instead of starting with the individual |
676 | <c><guide></c> tag). Instead of starting with the individual |
| 676 | <c><chapter></c>'s, you define a <c><part></c>, which is the |
677 | <c><chapter></c>'s, you define a <c><part></c>, which is the |
| 677 | equivalent of a separate part in a book: |
678 | equivalent of a separate part in a book: |
| 678 | </p> |
679 | </p> |
| 679 | |
680 | |
| 680 | <pre caption="Defining a part"> |
681 | <pre caption="Defining a part"> |
| 681 | <part> |
682 | <part> |
| … | |
… | |
| 716 | </section> |
717 | </section> |
| 717 | <section> |
718 | <section> |
| 718 | <title>Designing the Individual Chapters</title> |
719 | <title>Designing the Individual Chapters</title> |
| 719 | <body> |
720 | <body> |
| 720 | |
721 | |
| 721 | <p> |
722 | <p> |
| 722 | The content of an individual chapter is structured as follows: |
723 | The content of an individual chapter is structured as follows: |
| 723 | </p> |
724 | </p> |
| 724 | |
725 | |
| 725 | <pre caption="Chapter Syntax"> |
726 | <pre caption="Chapter Syntax"> |
| 726 | <?xml version='1.0' encoding='UTF-8'?> |
727 | <?xml version='1.0' encoding='UTF-8'?> |
| 727 | <!DOCTYPE sections SYSTEM "/dtd/book.dtd"> |
728 | <!DOCTYPE sections SYSTEM "/dtd/book.dtd"> |
| 728 | <!-- $Header$ --> |
729 | <!-- $Header$ --> |
| 729 | |
730 | |
| 730 | <!-- The content of this document is licensed under the CC-BY-SA license --> |
731 | <!-- The content of this document is licensed under the CC-BY-SA license --> |
| 731 | <!-- See http://creativecommons.org/licenses/by-sa/2.0 --> |
732 | <!-- See http://creativecommons.org/licenses/by-sa/2.5 --> |
| 732 | |
733 | |
| 733 | <sections> |
734 | <sections> |
| 734 | |
735 | |
| 735 | <version>...</version> |
736 | <version>...</version> |
| 736 | <date>...</date> |
737 | <date>...</date> |
| 737 | |
738 | |
| 738 | <comment>(Define the several <section> and <subsection>)</comment> |
739 | <comment>(Define the several <section> and <subsection>)</comment> |
| 739 | |
740 | |
| 740 | </sections> |
741 | </sections> |
| 741 | </pre> |
742 | </pre> |
| 742 | |
743 | |
| 743 | <p> |
744 | <p> |
| 744 | Inside each chapter you can define <c><section></c>'s (equivalent of |
745 | Inside each chapter you can define <c><section></c>'s (equivalent of |
| 745 | <c><chapter></c> in a Guide) and <c><subsection></c>'s (equivalent |
746 | <c><chapter></c> in a Guide) and <c><subsection></c>'s (equivalent |
| 746 | of <c><section></c> in a Guide). |
747 | of <c><section></c> in a Guide). |