/[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.51 Revision 1.52
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.51 2005/10/09 11:00:20 neysx Exp $ --> 2<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/xml-guide.xml,v 1.52 2005/10/13 15:57:42 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 XML Guide</title> 6<title>Gentoo 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 26Gentoo GuideXML syntax. This syntax is the official format for Gentoo
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.26</version> 35<version>2.27</version>
36<date>2005-10-09</date> 36<date>2005-10-11</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
52<p> 52<p>
53The goal is to make it easy to <e>create</e> and <e>transform</e> guide XML 53The goal is to make it easy to <e>create</e> and <e>transform</e> guide XML
54documents. 54documents.
55</p> 55</p>
56 56
57</body> 57</body>
58</section> 58</section>
59<section> 59<section>
60<title>Further Resources</title> 60<title>Further Resources</title>
61<body> 61<body>
62 62
63<p> 63<p>
64If you are planning on contributing documentation to Gentoo, or you want to 64If you are planning on contributing documentation to Gentoo, or you want to
65test GuideXML, please read the <uri 65test GuideXML, please read our <uri
66link="/proj/en/gdp/doc/doc-tipsntricks.xml">Tips and Tricks</uri> which 66link="/proj/en/gdp/doc/doc-tipsntricks.xml">Doc Tips 'n' Tricks</uri> guide
67contains tips and tricks for documentation development. 67which contains tips and tricks for documentation development.
68</p>
69
70<p>
71You may want to look at the <uri link="?passthru=1">XML source</uri> of this
72document while you read it.
68</p> 73</p>
69 74
70</body> 75</body>
71</section> 76</section>
72</chapter> 77</chapter>
73 78
74<chapter> 79<chapter>
75<title>Guide XML</title> 80<title>Guide XML</title>
76<section> 81<section>
77<title>Basic structure</title> 82<title>Basic structure</title>
78<body> 83<body>
79 84
80<p> 85<p>
81Let's start learning the GuideXML syntax. We'll start with the the initial 86Let's start learning the GuideXML syntax. We'll start with the the initial
82tags used in a GuideXML document: 87tags used in a GuideXML document:
123specify the full path because it is also used to check whether a more recent 128specify the full path because it is also used to check whether a more recent
124original document exists. The <c>lang</c> attribute should be used to specify 129original document exists. The <c>lang</c> attribute should be used to specify
125the language code of your document. It is used to format the date and insert 130the language code of your document. It is used to format the date and insert
126strings like "<e>Note</e>", "<e>Content</e>", etc. in the specified language. 131strings like "<e>Note</e>", "<e>Content</e>", etc. in the specified language.
127The default is English. 132The default is English.
128</p> 133</p>
129 134
130<p> 135<p>
131Next, there's a <c>&lt;title&gt;</c> tag, used to set the title for the entire 136Next, there's a <c>&lt;title&gt;</c> tag, used to set the title for the entire
132guide document. 137guide document.
133</p> 138</p>
134 139
135<p> 140<p>
136Then, we come to the <c>&lt;author&gt;</c> tags, which contain information 141Then, we come to the <c>&lt;author&gt;</c> tags, which contain information
137about the various authors of the document. Each <c>&lt;author&gt;</c> tag 142about the various authors of the document. Each <c>&lt;author&gt;</c> tag
138allows for an optional <c>title=</c> element, used to specify the author's 143allows for an optional <c>title</c> element, used to specify the author's
139relationship to the document (author, co-author, editor, etc.). In this 144relationship to the document (author, co-author, editor, etc.). In this
140particular example, the authors' names are enclosed in another tag -- a 145particular example, the authors' names are enclosed in another tag -- a
141<c>&lt;mail&gt;</c> tag, used to specify an email address for this particular 146<c>&lt;mail&gt;</c> tag, used to specify an email address for this particular
142person. The <c>&lt;mail&gt;</c> tag is optional and can be omitted, and no 147person. The <c>&lt;mail&gt;</c> tag is optional and can be omitted, and no
143more than one <c>&lt;author&gt;</c> element is required per guide document. 148more than one <c>&lt;author&gt;</c> element is required per guide document.
144</p> 149</p>
145 150
146<p> 151<p>
147Next, we come to the <c>&lt;abstract&gt;</c>, <c>&lt;version&gt;</c> and 152Next, we come to the <c>&lt;abstract&gt;</c>, <c>&lt;version&gt;</c> and
148<c>&lt;date&gt;</c> tags, used to specify a summary of the document, the 153<c>&lt;date&gt;</c> tags, used to specify a summary of the document, the
149current version number, and the current version date (in YYYY-MM-DD format) 154current version number, and the current version date (in YYYY-MM-DD format)
150respectively. Dates that are invalid or not in the YYYY-MM-DD format will 155respectively. Dates that are invalid or not in the YYYY-MM-DD format will
151appear verbatim in the rendered document. 156appear verbatim in the rendered document.
152</p> 157</p>
153 158
285<warn> 290<warn>
286This is a warning. 291This is a warning.
287</warn> 292</warn>
288 293
289<impo> 294<impo>
290This is important. 295This is important.
291</impo> 296</impo>
292 297
293</body> 298</body>
294</section> 299</section>
295<section> 300<section>
296<title>The &lt;body&gt; tags</title> 301<title>The &lt;body&gt; tags</title>
297<body> 302<body>
298 303
299<p> 304<p>
300We introduced a lot of new tags in the previous section -- here's what you 305We introduced a lot of new tags in the previous section -- here's what you need
301need to know. The <c>&lt;p&gt;</c> (paragraph), <c>&lt;pre&gt;</c> (code 306to know. The <c>&lt;p&gt;</c> (paragraph), <c>&lt;pre&gt;</c> (code block),
302block), <c>&lt;note&gt;</c>, <c>&lt;warn&gt;</c> (warning) and 307<c>&lt;note&gt;</c>, <c>&lt;warn&gt;</c> (warning) and <c>&lt;impo&gt;</c>
303<c>&lt;impo&gt;</c> (important) tags all can contain one or more lines of text. 308(important) tags all can contain one or more lines of text. Besides the
309<c>&lt;table&gt;</c>, <c>&lt;ul&gt;</c>, <c>&lt;ol&gt;</c> and
304Besides the <c>&lt;table&gt;</c> element (which we'll cover in just a bit), 310<c>&lt;dl&gt;</c> elements (which we'll cover in just a bit), these are the
305these are the only tags that should appear immediately inside a 311only tags that should appear immediately inside a <c>&lt;body&gt;</c> element.
306<c>&lt;body&gt;</c> element. Another thing -- these tags <e>should not</e> be 312Another thing -- these tags <e>should not</e> be stacked -- in other words,
307stacked -- in other words, don't put a <c>&lt;note&gt;</c> element inside a 313don't put a <c>&lt;note&gt;</c> element inside a <c>&lt;p&gt;</c> element. As
308<c>&lt;p&gt;</c> element. As you might guess, the <c>&lt;pre&gt;</c> element 314you might guess, the <c>&lt;pre&gt;</c> element preserves its whitespace
309preserves its whitespace exactly, making it well-suited for code excerpts. 315exactly, making it well-suited for code excerpts. You must name the
310You must name the <c>&lt;pre&gt;</c> tag with a caption attribute: 316<c>&lt;pre&gt;</c> tag with a caption attribute:
311</p> 317</p>
312 318
313<pre caption="Named &lt;pre&gt;"> 319<pre caption="Named &lt;pre&gt;">
314&lt;pre caption="Output of uptime"&gt; 320&lt;pre caption="Output of uptime"&gt;
315# &lt;i&gt;uptime&lt;/i&gt; 321# &lt;i&gt;uptime&lt;/i&gt;
31616:50:47 up 164 days, 2:06, 5 users, load average: 0.23, 0.20, 0.25 32216:50:47 up 164 days, 2:06, 5 users, load average: 0.23, 0.20, 0.25
317&lt;/pre&gt; 323&lt;/pre&gt;
318</pre> 324</pre>
319 325
320</body> 326</body>
321</section> 327</section>
322<section> 328<section>
323<title>&lt;path&gt;, &lt;c&gt;, &lt;i&gt;, &lt;b&gt; and &lt;e&gt;</title> 329<title>Epigraphs</title>
330<body>
331
332<p by="Anonymous student">
333Delegates from the original 13 states formed the Contented Congress. Thomas
334Jefferson, a Virgin, and Benjamin Franklin were two singers of the Declaration
335of Independence. Franklin discovered electricity by rubbing two cats backwards
336and declared, "A horse divided against itself cannot stand." Franklin died in
3371790 and is still dead.
338</p>
339
340<p>
341Epigraphs are sometimes used at the beginning of chapters to illustrate what is
342to follow. It is simply a paragraph with a <c>by</c> attribute that contains
343the signature.
344</p>
345
346<pre caption="Short epigraph">
347&lt;p by="Anonymous student"&gt;
348Delegates from the original 13 states formed the...
349&lt;/p&gt;
350</pre>
351
324<body> 352</body>
353</section>
354<section>
355<title>
356 &lt;path&gt;, &lt;c&gt;, &lt;i&gt;, &lt;b&gt;, &lt;e&gt;, &lt;sub&gt; and &lt;sup&gt;
357</title>
358<body>
325 359
326<p> 360<p>
327The <c>&lt;path&gt;</c>, <c>&lt;c&gt;</c>, <c>&lt;b&gt;</c> and <c>&lt;e&gt;</c> elements can 361The <c>&lt;path&gt;</c>, <c>&lt;c&gt;</c>, <c>&lt;b&gt;</c>, <c>&lt;e&gt;</c>,
328be used inside any child <c>&lt;body&gt;</c> tag, except for
329<c>&lt;pre&gt;</c>. The <c>&lt;i&gt;</c> element can only be used inside 362<c>&lt;sub&gt;</c> and <c>&lt;sup&gt;</c> elements can be used inside any child
330<c>&lt;pre&gt;</c>. 363<c>&lt;body&gt;</c> tag, except for <c>&lt;pre&gt;</c>. The <c>&lt;i&gt;</c>
364element can only be used inside <c>&lt;pre&gt;</c>.
331</p> 365</p>
332 366
333<p> 367<p>
334The <c>&lt;path&gt;</c> element is used to mark text that refers to an 368The <c>&lt;path&gt;</c> element is used to mark text that refers to an
335<e>on-disk file</e> -- either an <e>absolute or relative path</e>, or a 369<e>on-disk file</e> -- either an <e>absolute or relative path</e>, or a
336<e>simple filename</e>. This element is generally rendered with a mono spaced 370<e>simple filename</e>. This element is generally rendered with a mono spaced
337font to offset it from the standard paragraph type. 371font to offset it from the standard paragraph type.
338</p> 372</p>
339 373
340<p> 374<p>
341The <c>&lt;c&gt;</c> element is used to mark up a <e>command</e> or <e>user 375The <c>&lt;c&gt;</c> element is used to mark up a <e>command</e> or <e>user
342input</e>. Think of <c>&lt;c&gt;</c> as a way to alert the reader to something 376input</e>. Think of <c>&lt;c&gt;</c> as a way to alert the reader to something
343that they can type in that will perform some kind of action. For example, all 377that they can type in that will perform some kind of action. For example, all
344the XML tags displayed in this document are enclosed in a <c>&lt;c&gt;</c> 378the XML tags displayed in this document are enclosed in a <c>&lt;c&gt;</c>
345element because they represent something that the user could type in that is 379element because they represent something that the user could type in that is
355<p> 389<p>
356When you want to highlight some text as user input inside a <c>&lt;pre&gt;</c>, 390When you want to highlight some text as user input inside a <c>&lt;pre&gt;</c>,
357use <c>&lt;i&gt;</c> instead. 391use <c>&lt;i&gt;</c> instead.
358</p> 392</p>
359 393
360<p> 394<p>
361As you might have guessed, <c>&lt;b&gt;</c> is used to <b>boldface</b> some 395As you might have guessed, <c>&lt;b&gt;</c> is used to <b>boldface</b> some
362text. 396text.
363</p> 397</p>
364 398
365<p> 399<p>
366<c>&lt;e&gt;</c> is used to apply emphasis to a word or phrase; for example: 400<c>&lt;e&gt;</c> is used to apply emphasis to a word or phrase; for example:
367I <e>really</e> should use semicolons more often. As you can see, this text is 401I <e>really</e> should use semicolons more often. As you can see, this text is
368offset from the regular paragraph type for emphasis. This helps to give your 402offset from the regular paragraph type for emphasis. This helps to give your
369prose more <e>punch</e>! 403prose more <e>punch</e>!
404</p>
405
406<p>
407The <c>&lt;sub&gt;</c> and <c>&lt;sup&gt;</c> elements are used to specify
408<sub>subscript</sub> and <sup>superscript</sup>.
370</p> 409</p>
371 410
372</body> 411</body>
373</section> 412</section>
374<section> 413<section>
375<title>&lt;mail&gt; and &lt;uri&gt;</title> 414<title>&lt;mail&gt; and &lt;uri&gt;</title>
376<body> 415<body>
377 416
378<p> 417<p>
379We've taken a look at the <c>&lt;mail&gt;</c> tag earlier; it's used to link 418We've taken a look at the <c>&lt;mail&gt;</c> tag earlier; it's used to link
380some text with a particular email address, and takes the form <c>&lt;mail 419some text with a particular email address, and takes the form <c>&lt;mail
381link="foo@bar.com"&gt;Mr. Foo Bar&lt;/mail&gt;</c>. If you want to display the 420link="foo@bar.com"&gt;Mr. Foo Bar&lt;/mail&gt;</c>. If you want to display the
382email address, you can use <c>&lt;mail&gt;foo@bar.com&lt;/mail&gt;</c>, this 421email address, you can use <c>&lt;mail&gt;foo@bar.com&lt;/mail&gt;</c>, this
383would be displayed as <mail>foo@bar.com</mail>. 422would be displayed as <mail>foo@bar.com</mail>.
384</p> 423</p>
397link="/doc/en/">documentation main index</uri> should be simply <c>&lt;uri 436link="/doc/en/">documentation main index</uri> should be simply <c>&lt;uri
398link="/doc/en/index.xml"&gt;documentation main index&lt;/uri&gt;</c>. You can 437link="/doc/en/index.xml"&gt;documentation main index&lt;/uri&gt;</c>. You can
399even omit <c>index.xml</c> when you link to a directory index, e.g. <c>&lt;uri 438even omit <c>index.xml</c> when you link to a directory index, e.g. <c>&lt;uri
400link="/doc/en/"&gt;documentation main index&lt;/uri&gt;</c>. 439link="/doc/en/"&gt;documentation main index&lt;/uri&gt;</c>.
401</p> 440</p>
402 441
403</body> 442</body>
404</section> 443</section>
405<section> 444<section>
406<title>Figures</title> 445<title>Figures</title>
407<body> 446<body>
408 447
409<p> 448<p>
410Here's how to insert a figure into a document -- <c>&lt;figure 449Here's how to insert a figure into a document -- <c>&lt;figure
411link="mygfx.png" short="my picture" caption="my favorite picture of all 450link="mygfx.png" short="my picture" caption="my favorite picture of all
412time"/&gt;</c>. The <c>link=</c> attribute points to the actual graphic image, 451time"/&gt;</c>. The <c>link</c> attribute points to the actual graphic image,
413the <c>short=</c> attribute specifies a short description (currently used for 452the <c>short</c> attribute specifies a short description (currently used for
414the image's HTML <c>alt=</c> attribute), and a caption. Not too difficult 453the image's HTML <c>alt</c> attribute), and a caption. Not too difficult
415:) We also support the standard HTML-style &lt;img src="foo.gif"/&gt; tag 454:) We also support the standard HTML-style &lt;img src="foo.gif"/&gt; tag
416for adding images without captions, borders, etc. 455for adding images without captions, borders, etc.
417</p> 456</p>
418 457
419</body> 458</body>
420</section> 459</section>
421<section> 460<section>
422<title>Tables and lists</title> 461<title>Tables</title>
423<body> 462<body>
424 463
425<p> 464<p>
426Guide supports a simplified table syntax similar to that of HTML. To start a 465Guide supports a simplified table syntax similar to that of HTML. To start a
427table, use a <c>&lt;table&gt;</c> tag. Start a row with a <c>&lt;tr&gt;</c> 466table, use a <c>&lt;table&gt;</c> tag. Start a row with a <c>&lt;tr&gt;</c>
428tag. However, for inserting actual table data, we <e>don't</e> support the 467tag. However, for inserting actual table data, we <e>don't</e> support the
429HTML &lt;td&gt; tag; instead, use the <c>&lt;th&gt;</c> if you are inserting a 468HTML &lt;td&gt; tag; instead, use the <c>&lt;th&gt;</c> if you are inserting a
430header, and <c>&lt;ti&gt;</c> if you are inserting a normal informational 469header, and <c>&lt;ti&gt;</c> if you are inserting a normal informational
431block. You can use a <c>&lt;th&gt;</c> anywhere you can use a <c>&lt;ti&gt;</c> 470block. You can use a <c>&lt;th&gt;</c> anywhere you can use a <c>&lt;ti&gt;</c>
432-- there's no requirement that <c>&lt;th&gt;</c> elements appear only in the 471-- there's no requirement that <c>&lt;th&gt;</c> elements appear only in the
433first row. 472first row.
434</p> 473</p>
435 474
436<p> 475<p>
476Besides, the table header tag (<c>&lt;th&gt;</c>) accepts the <c>colspan</c>
477and <c>rowspan</c> attributes to span titles across rows, columns or both as
478shown below:
479</p>
480
481<table>
482 <tr>
483 <th colspan="4">This title spans 4 columns</th>
484 </tr>
485 <tr>
486 <th rowspan="3">This title spans 3 rows</th>
487 <ti>Item A1</ti>
488 <ti>Item A2</ti>
489 <ti>Item A3</ti>
490 </tr>
491 <tr>
492 <ti>Item B1</ti>
493 <th colspan="2" rowspan="2">Blocky 2x2 title</th>
494 </tr>
495 <tr>
496 <ti>Item C1</ti>
497 </tr>
498</table>
499
500</body>
501</section>
502<section>
503<title>Lists</title>
504<body>
505
506<p>
437To create ordered or unordered lists, simply use the XHTML-style 507To create ordered or unordered lists, simply use the XHTML-style
438<c>&lt;ol&gt;</c>, <c>&lt;ul&gt;</c> and <c>&lt;li&gt;</c> tags. List tags 508<c>&lt;ol&gt;</c>, <c>&lt;ul&gt;</c> and <c>&lt;li&gt;</c> tags. Lists may only
439should only appear inside a <c>&lt;body&gt;</c>, <c>&lt;ul&gt;</c> or 509appear inside the <c>&lt;body&gt;</c> and <c>&lt;li&gt;</c> tags which means
440<c>&lt;ol&gt;</c> tag. You need to close the tags as well (which is a general 510that you can have lists inside lists. Don't forget that you are writing XML and
441XML requirement). 511that you must close all tags including list items unlike in HTML.
512</p>
513
442</p> 514<p>
515Definition lists (<c>&lt;dl&gt;</c>) are also supported. Please note that
516neither the definition term tag (<c>&lt;dt&gt;</c>) nor the definition data tag
517(<c>&lt;dd&gt;</c>) accept any other block level tag such as paragraphs or
518admonitions. A definition list comprises
519</p>
520
521<dl>
522 <dt><c>&lt;dl&gt;</c></dt>
523 <dd>A <b>D</b>efinition <b>L</b>ist Tag containing</dd>
524 <dt><c>&lt;dt&gt;</c></dt>
525 <dd>Pairs of <b>D</b>efinition <b>T</b>erm Tags</dd>
526 <dt><c>&lt;dd&gt;</c></dt>
527 <dd>and <b>D</b>efinition <b>D</b>ata Tags</dd>
528</dl>
529
530<p>
531The following list copied from <uri
532link="http://www.w3.org/TR/REC-html40/struct/lists.html">w3.org</uri> shows
533that a definition list can contain ordered and unordered lists. It may not
534contain another definition list though.
535</p>
536
537<dl>
538 <dt><b>The ingredients:</b></dt>
539 <dd>
540 <ul>
541 <li>100 g. flour</li>
542 <li>10 g. sugar</li>
543 <li>1 cup water</li>
544 <li>2 eggs</li>
545 <li>salt, pepper</li>
546 </ul>
547 </dd>
548 <dt><b>The procedure:</b></dt>
549 <dd>
550 <ol>
551 <li>Mix dry ingredients thoroughly.</li>
552 <li>Pour in wet ingredients.</li>
553 <li>Mix for 10 minutes.</li>
554 <li>Bake for one hour at 300 degrees.</li>
555 </ol>
556 </dd>
557 <dt><b>Notes:</b></dt>
558 <dd>The recipe may be improved by adding raisins.</dd>
559</dl>
443 560
444</body> 561</body>
445</section> 562</section>
446<section> 563<section>
447<title>Intra-document references</title> 564<title>Intra-document references</title>
448<body> 565<body>
449 566
450<p> 567<p>
451Guide makes it really easy to reference other parts of the document using 568Guide makes it really easy to reference other parts of the document using
452hyperlinks. You can create a link pointing to <uri link="#doc_chap1">Chapter 569hyperlinks. You can create a link pointing to <uri link="#doc_chap1">Chapter
453One</uri> by typing <c>&lt;uri link="#doc_chap1"&gt;Chapter 570One</uri> by typing <c>&lt;uri link="#doc_chap1"&gt;Chapter
454One&lt;/uri&gt;</c>. To point to <uri link="#doc_chap1_sect2">section two of 571One&lt;/uri&gt;</c>. To point to <uri link="#doc_chap1_sect2">section two of
455Chapter One</uri>, type <c>&lt;uri link="#doc_chap1_sect2"&gt;section two of 572Chapter One</uri>, type <c>&lt;uri link="#doc_chap1_sect2"&gt;section two of
456Chapter One&lt;/uri&gt;</c>. To refer to figure 3 in chapter 1, type <c>&lt;uri 573Chapter One&lt;/uri&gt;</c>. To refer to figure 3 in chapter 1, type <c>&lt;uri
457link="#doc_chap1_fig3"&gt;figure 1.3&lt;/uri&gt;</c>. Or, to refer to <uri 574link="#doc_chap1_fig3"&gt;figure 1.3&lt;/uri&gt;</c>. Or, to refer to <uri
458link="#doc_chap2_pre2">code listing 2 in chapter 2</uri>, type <c>&lt;uri 575link="#doc_chap2_pre2">code listing 2 in chapter 2</uri>, type <c>&lt;uri
459link="#doc_chap2_pre2"&gt;code listing 2.2&lt;/uri&gt;</c>. We'll be 576link="#doc_chap2_pre2"&gt;code listing 2.2&lt;/uri&gt;</c>.
460adding other auto-link abilities (such as table support) soon.
461</p> 577</p>
462 578
463<p> 579<p>
464However, some guides change often and using such "counting" can lead to broken 580However, some guides change often and using such "counting" can lead to broken
465links. In order to cope with this, you can define a name for a 581links. In order to cope with this, you can define a name for a
466<c>&lt;chapter&gt;</c>, <c>&lt;section&gt;</c> or a <c>&lt;tr&gt;</c> by using 582<c>&lt;chapter&gt;</c>, <c>&lt;section&gt;</c> or a <c>&lt;tr&gt;</c> by using
467the <c>id</c> attribute, and then point to that attribute, like this: 583the <c>id</c> attribute, and then point to that attribute, like this:
468</p> 584</p>
469 585
470<pre caption="Using the id attribute"> 586<pre caption="Using the id attribute">
471&lt;chapter id="foo"&gt; 587&lt;chapter id="foo"&gt;
472&lt;title&gt;This is foo!&lt;/title&gt; 588&lt;title&gt;This is foo!&lt;/title&gt;
473... 589...
474&lt;p&gt; 590&lt;p&gt;
475More information can be found in the &lt;uri link="#foo"&gt;foo chapter&lt;/uri&gt; 591More information can be found in the &lt;uri link="#foo"&gt;foo chapter&lt;/uri&gt;

Legend:
Removed from v.1.51  
changed lines
  Added in v.1.52

  ViewVC Help
Powered by ViewVC 1.1.20