| 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.22 2003/11/15 00:32:59 neysx Exp $ --> |
2 | <!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/xml-guide.xml,v 1.23 2003/11/17 17:05:58 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 | |
17 | |
| 18 | <license/> |
18 | <license/> |
| 19 | <abstract> |
19 | <abstract> |
| 20 | This guide shows you how to compose web documentation using the new lightweight |
20 | 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 |
21 | Gentoo GuideXML syntax. This syntax is the official format for Gentoo Linux |
| 22 | documentation, and this document itself was created using GuideXML. This guide |
22 | documentation, and this document itself was created using GuideXML. This guide |
| 23 | assumes a basic working knowledge of XML and HTML. |
23 | assumes a basic working knowledge of XML and HTML. |
| 24 | </abstract> |
24 | </abstract> |
| 25 | |
25 | |
| 26 | <version>2.4</version> |
26 | <version>2.5</version> |
| 27 | <date>November 5, 2003</date> |
27 | <date>November 17, 2003</date> |
| 28 | |
28 | |
| 29 | <chapter> |
29 | <chapter> |
| 30 | <title>Guide basics</title> |
30 | <title>Guide basics</title> |
| 31 | <section> |
31 | <section> |
| 32 | <title>Guide XML design goals</title> |
32 | <title>Guide XML design goals</title> |
| 33 | <body> |
33 | <body> |
| 34 | |
34 | |
| 35 | <p> |
35 | <p> |
| 36 | The guide XML syntax is lightweight yet expressive, so that it is easy to |
36 | The guide XML syntax is lightweight yet expressive, so that it is easy to |
| 37 | learn yet also provides all the features we need for the creation of web |
37 | learn yet also provides all the features we need for the creation of web |
| 38 | documentation. The number of tags is kept to a minimum -- just those we need. |
38 | documentation. The number of tags is kept to a minimum -- just those we need. |
| 39 | This makes it easy to transform guide into other formats, such as DocBook |
39 | This makes it easy to transform guide into other formats, such as DocBook |
| 40 | XML/SGML or web-ready HTML. |
40 | XML/SGML or web-ready HTML. |
| 41 | </p> |
41 | </p> |
| 42 | |
42 | |
| … | |
… | |
| 398 | <title>Intra-document references</title> |
398 | <title>Intra-document references</title> |
| 399 | <body> |
399 | <body> |
| 400 | |
400 | |
| 401 | <p> |
401 | <p> |
| 402 | Guide makes it really easy to reference other parts of the document using |
402 | Guide makes it really easy to reference other parts of the document using |
| 403 | hyperlinks. You can create a link pointing to <uri link="#doc_chap1">Chapter |
403 | hyperlinks. You can create a link pointing to <uri link="#doc_chap1">Chapter |
| 404 | One</uri> by typing <c><uri link="#doc_chap1">Chapter |
404 | One</uri> by typing <c><uri link="#doc_chap1">Chapter |
| 405 | One</uri></c>. To point to <uri link="#doc_chap1_sect2">section two of |
405 | One</uri></c>. To point to <uri link="#doc_chap1_sect2">section two of |
| 406 | Chapter One</uri>, type <c><uri link="#doc_chap1_sect2">section two of |
406 | Chapter One</uri>, type <c><uri link="#doc_chap1_sect2">section two of |
| 407 | Chapter One</uri></c>. To refer to figure 3 in chapter 1, type <c><uri |
407 | Chapter One</uri></c>. To refer to figure 3 in chapter 1, type <c><uri |
| 408 | link="doc_chap1_fig3">figure 1.3</uri></c>. Or, to refer to <uri |
408 | link="doc_chap1_fig3">figure 1.3</uri></c>. Or, to refer to <uri |
| 409 | link="#doc_chap2_pre2">code listing 2 in chapter 2</uri>, type <c><uri |
409 | link="#doc_chap2_pre2">code listing 2 in chapter 2</uri>, type <c><uri |
| 410 | link="doc_chap2_pre2">code listing 2.2</uri></c>. We'll be |
410 | link="doc_chap2_pre2">code listing 2.2</uri></c>. We'll be |
| 411 | adding other auto-link abilities (such as table support) soon. |
411 | adding other auto-link abilities (such as table support) soon. |
| 412 | </p> |
412 | </p> |
|
|
413 | |
|
|
414 | <p> |
|
|
415 | However, some guides change often and using such "counting" can lead to broken |
|
|
416 | links. In order to cope with this, you can define a name for a |
|
|
417 | <c><chapter></c> or <c><section></c> by using the <c>id</c> |
|
|
418 | attribute, and then point to that attribute, like this: |
|
|
419 | </p> |
|
|
420 | |
|
|
421 | <pre caption="Using the id attribute"> |
|
|
422 | <chapter id="foo"> |
|
|
423 | <title>This is foo!</title> |
|
|
424 | ... |
|
|
425 | <p> |
|
|
426 | More information can be found in the <uri link="#foo">foo chapter</uri> |
|
|
427 | </p> |
|
|
428 | </pre> |
| 413 | |
429 | |
| 414 | </body> |
430 | </body> |
| 415 | </section> |
431 | </section> |
| 416 | </chapter> |
432 | </chapter> |
| 417 | |
433 | |
| 418 | <chapter> |
434 | <chapter> |
| 419 | <title>Coding Style</title> |
435 | <title>Coding Style</title> |
| 420 | <section> |
436 | <section> |
| 421 | <title>Introduction</title> |
437 | <title>Introduction</title> |
| 422 | <body> |
438 | <body> |
| 423 | |
439 | |
| 424 | <p> |
440 | <p> |
| 425 | Since all Gentoo Documentation is a joint effort and several people will |
441 | Since all Gentoo Documentation is a joint effort and several people will |
| 426 | most likely change existing documentation, a coding style is needed. |
442 | most likely change existing documentation, a coding style is needed. |
| 427 | A coding style contains two sections. The first one is regarding |
443 | A coding style contains two sections. The first one is regarding |