/[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.60 Revision 1.61
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.60 2006/04/10 09:15:44 neysx Exp $ --> 2<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/xml-guide.xml,v 1.61 2006/04/26 10:26:55 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="neysx@gentoo.org">Xavier Neys</mail> 9 <mail link="neysx@gentoo.org">Xavier Neys</mail>
10</author> 10</author>
11<author title="Author"> 11<author title="Author">
12 <mail link="drobbins@gentoo.org">Daniel Robbins</mail> 12 <mail link="drobbins@gentoo.org">Daniel Robbins</mail>
13</author> 13</author>
14<author title="Author"><!-- zhen@gentoo.org --> 14<author title="Author"><!-- zhen@gentoo.org -->
15 John P. Davis 15 John P. Davis
16</author> 16</author>
17<author title="Editor"> 17<author title="Editor">
20<author title="Editor"> 20<author title="Editor">
21 <mail link="swift@gentoo.org">Sven Vermeulen</mail> 21 <mail link="swift@gentoo.org">Sven Vermeulen</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>5</version> 35<version>6</version>
36<date>2006-04-10</date> 36<date>2006-04-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
526 526
527<p> 527<p>
528Guide supports a simplified table syntax similar to that of HTML. To start a 528Guide supports a simplified table syntax similar to that of HTML. To start a
529table, use a <c>&lt;table&gt;</c> tag. Start a row with a <c>&lt;tr&gt;</c> 529table, use a <c>&lt;table&gt;</c> tag. Start a row with a <c>&lt;tr&gt;</c>
530tag. However, for inserting actual table data, we <e>don't</e> support the 530tag. However, for inserting actual table data, we <e>don't</e> support the
531HTML &lt;td&gt; tag; instead, use the <c>&lt;th&gt;</c> if you are inserting a 531HTML &lt;td&gt; tag; instead, use the <c>&lt;th&gt;</c> if you are inserting a
532header, and <c>&lt;ti&gt;</c> if you are inserting a normal informational 532header, and <c>&lt;ti&gt;</c> if you are inserting a normal informational
533block. You can use a <c>&lt;th&gt;</c> anywhere you can use a <c>&lt;ti&gt;</c> 533block. You can use a <c>&lt;th&gt;</c> anywhere you can use a <c>&lt;ti&gt;</c>
534-- there's no requirement that <c>&lt;th&gt;</c> elements appear only in the 534-- there's no requirement that <c>&lt;th&gt;</c> elements appear only in the
535first row. 535first row.
536</p> 536</p>
537 537
538<p> 538<p>
539Besides, both table headers (<c>&lt;th&gt;</c>) and table items 539Besides, both table headers (<c>&lt;th&gt;</c>) and table items
540(<c>&lt;ti&gt;</c>) accept the <c>colspan</c> and <c>rowspan</c> attributes to 540(<c>&lt;ti&gt;</c>) accept the <c>colspan</c> and <c>rowspan</c> attributes to
541span their content across rows, columns or both as shown below: 541span their content across rows, columns or both.
542</p>
543
544<p>
545Furthermore, table items (<c>&lt;ti&gt;</c>) can be right-aligned or centered
546with the <c>align</c> attribute. Table headers (<c>&lt;th&gt;</c>) are
547automatically centered.
542</p> 548</p>
543 549
544<table> 550<table>
545 <tr> 551 <tr>
546 <th colspan="4">This title spans 4 columns</th> 552 <th colspan="4">This title spans 4 columns</th>
547 </tr> 553 </tr>
548 <tr> 554 <tr>
549 <th rowspan="6">This title spans 6 rows</th> 555 <th rowspan="6">This title spans 6 rows</th>
550 <ti>Item A1</ti> 556 <ti>Item A1</ti>
551 <ti>Item A2</ti> 557 <ti>Item A2</ti>
552 <ti>Item A3</ti> 558 <ti>Item A3</ti>
553 </tr> 559 </tr>
554 <tr> 560 <tr>
555 <ti>Item B1</ti> 561 <ti align="center">Item B1</ti>
556 <th colspan="2" rowspan="2">Blocky 2x2 title</th> 562 <th colspan="2" rowspan="2">Blocky 2x2 title</th>
557 </tr> 563 </tr>
558 <tr> 564 <tr>
559 <ti>Item C1</ti> 565 <ti align="right">Item C1</ti>
560 </tr> 566 </tr>
561 <tr> 567 <tr>
562 <ti colspan="3">Item D1..D3</ti> 568 <ti colspan="3" align="center">Item D1..D3</ti>
563 </tr> 569 </tr>
564 <tr> 570 <tr>
565 <ti rowspan="2">Item E1..F1</ti> 571 <ti rowspan="2">Item E1..F1</ti>
566 <ti colspan="2">Item E2..E3</ti> 572 <ti colspan="2" align="right">Item E2..E3</ti>
567 </tr> 573 </tr>
568 <tr> 574 <tr>
569 <ti colspan="2">Item F2..F3</ti> 575 <ti colspan="2" align="right">Item F2..F3</ti>
570 </tr> 576 </tr>
571</table> 577</table>
572 578
573</body> 579</body>
574</section> 580</section>
575<section> 581<section>
576<title>Lists</title> 582<title>Lists</title>
577<body> 583<body>
578 584
579<p> 585<p>
580To create ordered or unordered lists, simply use the XHTML-style 586To create ordered or unordered lists, simply use the XHTML-style
581<c>&lt;ol&gt;</c>, <c>&lt;ul&gt;</c> and <c>&lt;li&gt;</c> tags. Lists may only 587<c>&lt;ol&gt;</c>, <c>&lt;ul&gt;</c> and <c>&lt;li&gt;</c> tags. Lists may only
582appear inside the <c>&lt;body&gt;</c> and <c>&lt;li&gt;</c> tags which means 588appear inside the <c>&lt;body&gt;</c> and <c>&lt;li&gt;</c> tags which means
583that you can have lists inside lists. Don't forget that you are writing XML and 589that you can have lists inside lists. Don't forget that you are writing XML and
584that you must close all tags including list items unlike in HTML. 590that you must close all tags including list items unlike in HTML.

Legend:
Removed from v.1.60  
changed lines
  Added in v.1.61

  ViewVC Help
Powered by ViewVC 1.1.20