/[gentoo]/xml/htdocs/doc/en/xml-guide.xml
Gentoo

Diff of /xml/htdocs/doc/en/xml-guide.xml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.46 Revision 1.47
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.46 2005/06/09 17:43:44 swift Exp $ --> 2<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/xml-guide.xml,v 1.47 2005/07/26 11:51:06 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>
25This guide shows you how to compose web documentation using the new lightweight 25This guide shows you how to compose web documentation using the new lightweight
26Gentoo GuideXML syntax. This syntax is the official format for Gentoo Linux 26Gentoo GuideXML syntax. This syntax is the official format for Gentoo Linux
27documentation, and this document itself was created using GuideXML. This guide 27documentation, and this document itself was created using GuideXML. This guide
28assumes a basic working knowledge of XML and HTML. 28assumes 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.22</version> 35<version>2.23</version>
36<date>2005-06-09</date> 36<date>2005-07-26</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>
45The guide XML syntax is lightweight yet expressive, so that it is easy to 45The guide XML syntax is lightweight yet expressive, so that it is easy to
46learn yet also provides all the features we need for the creation of web 46learn yet also provides all the features we need for the creation of web
47documentation. The number of tags is kept to a minimum -- just those we need. 47documentation. The number of tags is kept to a minimum -- just those we need.
48This makes it easy to transform guide into other formats, such as DocBook 48This makes it easy to transform guide into other formats, such as DocBook
49XML/SGML or web-ready HTML. 49XML/SGML or web-ready HTML.
50</p> 50</p>
51 51
408 408
409</body> 409</body>
410</section> 410</section>
411<section> 411<section>
412<title>Tables and lists</title> 412<title>Tables and lists</title>
413<body> 413<body>
414 414
415<p> 415<p>
416Guide supports a simplified table syntax similar to that of HTML. To start 416Guide supports a simplified table syntax similar to that of HTML. To start
417a table, use a <c>&lt;table&gt;</c> tag. Start a row with a <c>&lt;tr&gt;</c> 417a table, use a <c>&lt;table&gt;</c> tag. Start a row with a <c>&lt;tr&gt;</c>
418tag. However, for inserting actual table data, we <e>don't</e> support the 418tag. However, for inserting actual table data, we <e>don't</e> support the
419HTML &lt;td&gt; tag; instead, use the <c>&lt;th&gt;</c> if you are inserting a 419HTML &lt;td&gt; tag; instead, use the <c>&lt;th&gt;</c> if you are inserting a
420header, and <c>&lt;ti&gt;</c> if you are inserting a normal informational 420header, and <c>&lt;ti&gt;</c> if you are inserting a normal informational
421block. You can use a <c>&lt;th&gt;</c> anywhere you can use a <c>&lt;ti&gt;</c> 421block. You can use a <c>&lt;th&gt;</c> anywhere you can use a <c>&lt;ti&gt;</c>
422-- there's no requirement that <c>&lt;th&gt;</c> elements appear only in the 422-- there's no requirement that <c>&lt;th&gt;</c> elements appear only in the
423first row. Currently, these tags don't support any attributes, but some will 423first row. Currently, these tags don't support any attributes, but some might
424be added (such as a <c>caption=</c> attribute for <c>&lt;table&gt;</c>) soon. 424be added (such as a <c>caption=</c> attribute for <c>&lt;table&gt;</c>) later.
425</p> 425</p>
426 426
427<p> 427<p>
428To create ordered or unordered lists, simply use the XHTML-style 428To create ordered or unordered lists, simply use the XHTML-style
429<c>&lt;ol&gt;</c>, <c>&lt;ul&gt;</c> and <c>&lt;li&gt;</c> tags. List tags 429<c>&lt;ol&gt;</c>, <c>&lt;ul&gt;</c> and <c>&lt;li&gt;</c> tags. List tags
430should only appear inside a <c>&lt;body&gt;</c>, <c>&lt;ul&gt;</c> or 430should only appear inside a <c>&lt;body&gt;</c>, <c>&lt;ul&gt;</c> or
431<c>&lt;ol&gt;</c> tag. You need to close the tags as well (which is a general 431<c>&lt;ol&gt;</c> tag. You need to close the tags as well (which is a general
432XML requirement). 432XML requirement).
433</p> 433</p>
434 434
435</body> 435</body>
436</section> 436</section>
437<section> 437<section>
438<title>Intra-document references</title> 438<title>Intra-document references</title>
439<body> 439<body>
442Guide makes it really easy to reference other parts of the document using 442Guide makes it really easy to reference other parts of the document using
443hyperlinks. You can create a link pointing to <uri link="#doc_chap1">Chapter 443hyperlinks. You can create a link pointing to <uri link="#doc_chap1">Chapter
444One</uri> by typing <c>&lt;uri link="#doc_chap1"&gt;Chapter 444One</uri> by typing <c>&lt;uri link="#doc_chap1"&gt;Chapter
445One&lt;/uri&gt;</c>. To point to <uri link="#doc_chap1_sect2">section two of 445One&lt;/uri&gt;</c>. To point to <uri link="#doc_chap1_sect2">section two of
446Chapter One</uri>, type <c>&lt;uri link="#doc_chap1_sect2"&gt;section two of 446Chapter One</uri>, type <c>&lt;uri link="#doc_chap1_sect2"&gt;section two of
447Chapter One&lt;/uri&gt;</c>. To refer to figure 3 in chapter 1, type <c>&lt;uri 447Chapter One&lt;/uri&gt;</c>. To refer to figure 3 in chapter 1, type <c>&lt;uri
448link="#doc_chap1_fig3"&gt;figure 1.3&lt;/uri&gt;</c>. Or, to refer to <uri 448link="#doc_chap1_fig3"&gt;figure 1.3&lt;/uri&gt;</c>. Or, to refer to <uri
449link="#doc_chap2_pre2">code listing 2 in chapter 2</uri>, type <c>&lt;uri 449link="#doc_chap2_pre2">code listing 2 in chapter 2</uri>, type <c>&lt;uri
450link="#doc_chap2_pre2"&gt;code listing 2.2&lt;/uri&gt;</c>. We'll be 450link="#doc_chap2_pre2"&gt;code listing 2.2&lt;/uri&gt;</c>. We'll be
451adding other auto-link abilities (such as table support) soon. 451adding other auto-link abilities (such as table support) soon.
452</p> 452</p>
453 453
454<p> 454<p>
455However, some guides change often and using such "counting" can lead to broken 455However, some guides change often and using such "counting" can lead to broken
456links. In order to cope with this, you can define a name for a 456links. In order to cope with this, you can define a name for a
457<c>&lt;chapter&gt;</c> or <c>&lt;section&gt;</c> by using the <c>id</c> 457<c>&lt;chapter&gt;</c>, <c>&lt;section&gt;</c> or a <c>&lt;tr&gt;</c> by using
458attribute, and then point to that attribute, like this: 458the <c>id</c> attribute, and then point to that attribute, like this:
459</p> 459</p>
460 460
461<pre caption="Using the id attribute"> 461<pre caption="Using the id attribute">
462&lt;chapter id="foo"&gt; 462&lt;chapter id="foo"&gt;
463&lt;title&gt;This is foo!&lt;/title&gt; 463&lt;title&gt;This is foo!&lt;/title&gt;
464... 464...
465&lt;p&gt; 465&lt;p&gt;
466More information can be found in the &lt;uri link="#foo"&gt;foo chapter&lt;/uri&gt; 466More information can be found in the &lt;uri link="#foo"&gt;foo chapter&lt;/uri&gt;
467&lt;/p&gt; 467&lt;/p&gt;
468</pre> 468</pre>
469 469
470</body> 470</body>
471</section> 471</section>
472</chapter> 472</chapter>
473 473

Legend:
Removed from v.1.46  
changed lines
  Added in v.1.47

  ViewVC Help
Powered by ViewVC 1.1.20