| … | |
… | |
| 3 | |
3 | |
| 4 | <guide link="/doc/en/xml-guide.xml"> |
4 | <guide link="/doc/en/xml-guide.xml"> |
| 5 | <title>Gentoo Linux XML Guide</title> |
5 | <title>Gentoo Linux XML Guide</title> |
| 6 | <author title="Author"><mail link="drobbins@gentoo.org">Daniel Robbins</mail></author> |
6 | <author title="Author"><mail link="drobbins@gentoo.org">Daniel Robbins</mail></author> |
| 7 | <author title="Author"><mail link="zhen@gentoo.org">John P. Davis</mail></author> |
7 | <author title="Author"><mail link="zhen@gentoo.org">John P. Davis</mail></author> |
| 8 | <author title="Editor"><mail link="peesh@gentoo.org">Jorge Paulo</mail></author> |
8 | <author title="Editor"><mail link="peesh@gentoo.org">Jorge Paulo</mail></author> |
| 9 | |
9 | |
| 10 | <license/> |
10 | <license/> |
| 11 | |
11 | |
| 12 | <abstract>This guide shows you how to compose web documentation using the new lightweight Gentoo guide |
12 | <abstract>This guide shows you how to compose web documentation using the new lightweight Gentoo guide |
| 13 | XML syntax. This syntax is the official format for Gentoo Linux documentation, and this document |
13 | XML syntax. This syntax is the official format for Gentoo Linux documentation, and this document |
| 14 | itself was created using guide XML. This guide assumes a basic working knowledge of XML and HTML. |
14 | itself was created using guide XML. This guide assumes a basic working knowledge of XML and HTML. |
| 15 | </abstract> |
15 | </abstract> |
| 16 | |
16 | |
| 17 | <version>2.0</version> |
17 | <version>2.0</version> |
| 18 | <date>12 May 2003</date> |
18 | <date>4th of August 2003</date> |
| 19 | |
19 | |
| 20 | <chapter> |
20 | <chapter> |
| 21 | <title>Guide basics</title> |
21 | <title>Guide basics</title> |
| 22 | |
22 | |
| 23 | <section> |
23 | <section> |
| 24 | <title>Guide XML design goals</title> |
24 | <title>Guide XML design goals</title> |
| 25 | <body> |
25 | <body> |
| 26 | |
26 | |
| 27 | <p> The guide XML syntax is lightweight yet expressive, so that it is easy to |
27 | <p> The guide XML syntax is lightweight yet expressive, so that it is easy to |
| 28 | learn yet also provides all the features we need for the creation of web |
28 | learn yet also provides all the features we need for the creation of web |
| 29 | documentation. The number of tags is kept to a minimum -- just those we need. |
29 | documentation. The number of tags is kept to a minimum -- just those we need. |
| 30 | This makes it easy to transform guide into other formats, such as DocBook |
30 | This makes it easy to transform guide into other formats, such as DocBook |
| 31 | XML/SGML or web-ready HTML. </p> |
31 | XML/SGML or web-ready HTML. </p> |
| 32 | |
32 | |
| 33 | <p>The goal is to make it easy to <e>create</e> and <e>transform</e> guide XML |
33 | <p>The goal is to make it easy to <e>create</e> and <e>transform</e> guide XML |
| … | |
… | |
| 109 | <?xml version='1.0' encoding="UTF-8"?> |
109 | <?xml version='1.0' encoding="UTF-8"?> |
| 110 | <guide link="relative_link_to_your_guide"> |
110 | <guide link="relative_link_to_your_guide"> |
| 111 | <title><i>Gentoo Linux Documentation Guide</i></title> |
111 | <title><i>Gentoo Linux Documentation Guide</i></title> |
| 112 | <author title="<i>Chief Architect</i>"><mail link="<i>drobbins@gentoo.org</i>"> |
112 | <author title="<i>Chief Architect</i>"><mail link="<i>drobbins@gentoo.org</i>"> |
| 113 | <i>Daniel Robbins</i></mail> |
113 | <i>Daniel Robbins</i></mail> |
| 114 | </author> |
114 | </author> |
| 115 | <author title="<i>Editor</i>"><mail link="<i>thomasfl@gentoo.org</i>"> |
115 | <author title="<i>Editor</i>"><mail link="<i>thomasfl@gentoo.org</i>"> |
| 116 | <i>Thomas Flavel</i></mail> |
116 | <i>Thomas Flavel</i></mail> |
| 117 | </author> |
117 | </author> |
| 118 | |
118 | |
| 119 | <abstract><i>This guide shows you how to compose web documentation using |
119 | <abstract><i>This guide shows you how to compose web documentation using |
| 120 | our new lightweight Gentoo guide XML syntax. This syntax is the official |
120 | our new lightweight Gentoo guide XML syntax. This syntax is the official |
| 121 | format for Gentoo Linux web documentation, and this document itself was created |
121 | format for Gentoo Linux web documentation, and this document itself was created |
| 122 | using guide XML.</i> </abstract> |
122 | using guide XML.</i> </abstract> |
| 123 | |
123 | |
|
|
124 | <license/> |
|
|
125 | |
| 124 | <version><i>1.0</i></version> |
126 | <version><i>1.0</i></version> |
| 125 | <date><i>29 Mar 2001</i></date> |
127 | <date><i>29 Mar 2001</i></date> |
| 126 | </pre> |
128 | </pre> |
| 127 | |
129 | |
| 128 | <p>On the first, line, we see the requisite tag that identifies this as an XML |
130 | <p>On the first, line, we see the requisite tag that identifies this as an XML |
| 129 | document. Following it, there's a <c><guide></c> tag -- the entire |
131 | document. Following it, there's a <c><guide></c> tag -- the entire |
| 130 | guide document is enclosed within a <c><guide> </guide></c> pair. |
132 | guide document is enclosed within a <c><guide> </guide></c> pair. |
| 131 | Next, there's a <c><title></c> tag, used to set the title for the entire |
133 | Next, there's a <c><title></c> tag, used to set the title for the entire |
| 132 | guide document. </p> |
134 | guide document. </p> |
| 133 | |
135 | |
| 134 | <p>Then, we come to the <c><author></c> tags, which contain information |
136 | <p>Then, we come to the <c><author></c> tags, which contain information |
| 135 | about the various authors of the document. Each <c><author></c> tag |
137 | about the various authors of the document. Each <c><author></c> tag |
| 136 | allows for an optional <c>title=</c> element, used to specify the author's |
138 | allows for an optional <c>title=</c> element, used to specify the author's |
| 137 | relationship to the document (author, co-author, editor, etc.). In this |
139 | relationship to the document (author, co-author, editor, etc.). In this |
| 138 | particular example, the authors' names are enclosed in another tag -- a |
140 | particular example, the authors' names are enclosed in another tag -- a |
| 139 | <c><mail></c> tag, used to specify an email address for this particular |
141 | <c><mail></c> tag, used to specify an email address for this particular |
| 140 | person. The <c><mail></c> tag is optional and can be omitted, and no |
142 | person. The <c><mail></c> tag is optional and can be omitted, and no |
| 141 | more than one <c><author></c> element is required per guide document. |
143 | more than one <c><author></c> element is required per guide document. |
| 142 | </p> |
144 | </p> |
| 143 | |
145 | |
| 144 | <p>Next, we come to the <c><abstract></c>, <c><version></c> and |
146 | <p>Next, we come to the <c><abstract></c>, <c><version></c> and |
| 145 | <c><date></c> tags, used to specify a summary of the document, the |
147 | <c><date></c> tags, used to specify a summary of the document, the |
| 146 | current version number, and the current version date (in DD MMM YYYY format) |
148 | current version number, and the current version date (in DD MMM YYYY format) |
| 147 | respectively. This rounds out the tags that should appear at the beginning of |
149 | respectively. This rounds out the tags that should appear at the beginning of |
| 148 | a guide document. Besides the <c><title></c> and <c><mail></c> |
150 | a guide document. Besides the <c><title></c> and <c><mail></c> |
| 149 | tags, these tags shouldn't appear anywhere else except immediately inside the |
151 | tags, these tags shouldn't appear anywhere else except immediately inside the |
| 150 | <c><guide></c> tag, and for consistency it's recommended (but not |
152 | <c><guide></c> tag, and for consistency it's recommended (but not |
| 151 | required) that these tags appear before the content of the document. </p> |
153 | required) that these tags appear before the content of the document. </p> |
|
|
154 | |
|
|
155 | <p>Finally we have the <c><license/></c> tag, used to publish the |
|
|
156 | document under the <uri link="http://creativecommons.org/licenses/by-sa/1.0/">Creative |
|
|
157 | Commons - Attribution / Share Alike</uri> license as required by the <uri |
|
|
158 | link="/doc/en/doc-policy.xml">Documentation Policy</uri>. |
|
|
159 | </p> |
| 152 | |
160 | |
| 153 | </body> |
161 | </body> |
| 154 | </section> |
162 | </section> |
| 155 | |
163 | |
| 156 | <section> |
164 | <section> |
| 157 | <title>Chapters and sections</title> |
165 | <title>Chapters and sections</title> |
| 158 | <body> |
166 | <body> |
| 159 | <p>Once the initial tags have been specified, you're ready to start adding |
167 | <p>Once the initial tags have been specified, you're ready to start adding |
| 160 | the structural elements of the document. Guide documents are divided into |
168 | the structural elements of the document. Guide documents are divided into |
| 161 | chapters, and each chapter can hold one or more sections. Every chapter |
169 | chapters, and each chapter can hold one or more sections. Every chapter |
| 162 | and section has a title. Here's an example chapter with a single section, |
170 | and section has a title. Here's an example chapter with a single section, |
| 163 | consisting of a paragraph. If you append this XML to the XML in the <uri link="#doc_pre2">previous |
171 | consisting of a paragraph. If you append this XML to the XML in the <uri link="#doc_pre2">previous |
| 164 | excerpt</uri> and append a <c></guide></c> to the end of the file, you'll have a valid |
172 | excerpt</uri> and append a <c></guide></c> to the end of the file, you'll have a valid |
| 165 | (if minimal) guide document: |
173 | (if minimal) guide document: |
| 166 | </p> |
174 | </p> |