| 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.39 2005/04/16 19:45:35 swift Exp $ --> |
2 | <!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/xml-guide.xml,v 1.40 2005/05/09 14:08:35 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 | |
| 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.0 --> |
32 | <!-- See http://creativecommons.org/licenses/by-sa/2.0 --> |
| 33 | <license/> |
33 | <license/> |
| 34 | |
34 | |
| 35 | <version>2.16</version> |
35 | <version>2.17</version> |
| 36 | <date>2005-04-16</date> |
36 | <date>2005-05-09</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 | |
| … | |
… | |
| 423 | </p> |
423 | </p> |
| 424 | |
424 | |
| 425 | </body> |
425 | </body> |
| 426 | </section> |
426 | </section> |
| 427 | <section> |
427 | <section> |
| 428 | <title>Intra-document references</title> |
428 | <title>Intra-document references</title> |
| 429 | <body> |
429 | <body> |
| 430 | |
430 | |
| 431 | <p> |
431 | <p> |
| 432 | Guide makes it really easy to reference other parts of the document using |
432 | Guide makes it really easy to reference other parts of the document using |
| 433 | hyperlinks. You can create a link pointing to <uri link="#doc_chap1">Chapter |
433 | hyperlinks. You can create a link pointing to <uri link="#doc_chap1">Chapter |
| 434 | One</uri> by typing <c><uri link="#doc_chap1">Chapter |
434 | One</uri> by typing <c><uri link="#doc_chap1">Chapter |
| 435 | One</uri></c>. To point to <uri link="#doc_chap1_sect2">section two of |
435 | One</uri></c>. To point to <uri link="#doc_chap1_sect2">section two of |
| 436 | Chapter One</uri>, type <c><uri link="#doc_chap1_sect2">section two of |
436 | Chapter One</uri>, type <c><uri link="#doc_chap1_sect2">section two of |
| 437 | Chapter One</uri></c>. To refer to figure 3 in chapter 1, type <c><uri |
437 | Chapter One</uri></c>. To refer to figure 3 in chapter 1, type <c><uri |
| 438 | link="doc_chap1_fig3">figure 1.3</uri></c>. Or, to refer to <uri |
438 | link="#doc_chap1_fig3">figure 1.3</uri></c>. Or, to refer to <uri |
| 439 | link="#doc_chap2_pre2">code listing 2 in chapter 2</uri>, type <c><uri |
439 | link="#doc_chap2_pre2">code listing 2 in chapter 2</uri>, type <c><uri |
| 440 | link="doc_chap2_pre2">code listing 2.2</uri></c>. We'll be |
440 | link="#doc_chap2_pre2">code listing 2.2</uri></c>. We'll be |
| 441 | adding other auto-link abilities (such as table support) soon. |
441 | adding other auto-link abilities (such as table support) soon. |
| 442 | </p> |
442 | </p> |
| 443 | |
443 | |
| 444 | <p> |
444 | <p> |
| 445 | However, some guides change often and using such "counting" can lead to broken |
445 | However, some guides change often and using such "counting" can lead to broken |
| 446 | links. In order to cope with this, you can define a name for a |
446 | links. In order to cope with this, you can define a name for a |
| 447 | <c><chapter></c> or <c><section></c> by using the <c>id</c> |
447 | <c><chapter></c> or <c><section></c> by using the <c>id</c> |
| 448 | attribute, and then point to that attribute, like this: |
448 | attribute, and then point to that attribute, like this: |
| 449 | </p> |
449 | </p> |
| 450 | |
450 | |
| 451 | <pre caption="Using the id attribute"> |
451 | <pre caption="Using the id attribute"> |
| 452 | <chapter id="foo"> |
452 | <chapter id="foo"> |
| 453 | <title>This is foo!</title> |
453 | <title>This is foo!</title> |
| 454 | ... |
454 | ... |
| 455 | <p> |
455 | <p> |