| 1 | <?xml version='1.0' encoding='UTF-8'?> |
1 | <?xml version='1.0' encoding='UTF-8'?> |
| 2 | |
2 | |
| 3 | <!-- $Header: /var/cvsroot/gentoo/xml/htdocs/proj/en/gdp/doc/metadoc-guide.xml,v 1.6 2011/08/23 14:35:58 swift Exp $ --> |
3 | <!-- $Header: /var/cvsroot/gentoo/xml/htdocs/proj/en/gdp/doc/metadoc-guide.xml,v 1.7 2011/09/04 14:58:00 swift Exp $ --> |
| 4 | |
4 | |
| 5 | <!DOCTYPE guide SYSTEM "/dtd/guide.dtd"> |
5 | <!DOCTYPE guide SYSTEM "/dtd/guide.dtd"> |
| 6 | |
6 | |
| 7 | <guide link="metadoc-guide.xml"> |
7 | <guide link="metadoc-guide.xml"> |
| 8 | <title>Gentoo Metadoc XML Guide</title> |
8 | <title>Gentoo Metadoc XML Guide</title> |
| 9 | |
9 | |
| 10 | <author title="Author"> |
10 | <author title="Author"> |
| 11 | <mail link="swift@gentoo.org">Sven Vermeulen</mail> |
11 | <mail link="swift"/> |
| 12 | </author> |
12 | </author> |
| 13 | |
|
|
| 14 | <author title="Editor"> |
13 | <author title="Editor"> |
| 15 | <mail link="neysx@gentoo.org">Xavier Neys</mail> |
14 | <mail link="neysx@gentoo.org">Xavier Neys</mail> |
|
|
15 | </author> |
|
|
16 | <author title="Editor"> |
|
|
17 | <mail link="nimiux"/> |
| 16 | </author> |
18 | </author> |
| 17 | |
19 | |
| 18 | <abstract> |
20 | <abstract> |
| 19 | This guide informs developers how to use the Metadoc XML format that allows the |
21 | This guide informs developers how to use the Metadoc XML format that allows the |
| 20 | Gentoo Documentation Project to keep its documentation in a hierarchical manner |
22 | Gentoo Documentation Project to keep its documentation in a hierarchical manner |
| … | |
… | |
| 23 | |
25 | |
| 24 | <!-- The content of this document is licensed under the CC-BY-SA license --> |
26 | <!-- The content of this document is licensed under the CC-BY-SA license --> |
| 25 | <!-- See http://creativecommons.org/licenses/by-sa/2.0 --> |
27 | <!-- See http://creativecommons.org/licenses/by-sa/2.0 --> |
| 26 | <license/> |
28 | <license/> |
| 27 | |
29 | |
| 28 | <version>2</version> |
30 | <version>3</version> |
| 29 | <date>2011-08-23</date> |
31 | <date>2011-09-04</date> |
| 30 | |
32 | |
| 31 | <chapter> |
33 | <chapter> |
| 32 | <title>Introduction</title> |
34 | <title>Introduction</title> |
| 33 | <section> |
35 | <section> |
| 34 | <title>Why is MetadocXML Needed?</title> |
36 | <title>Why is MetadocXML Needed?</title> |
| … | |
… | |
| 287 | <p> |
289 | <p> |
| 288 | The <c>docs</c> entity should only contain <c>doc</c> entities. |
290 | The <c>docs</c> entity should only contain <c>doc</c> entities. |
| 289 | </p> |
291 | </p> |
| 290 | |
292 | |
| 291 | <p> |
293 | <p> |
| 292 | Each <c>doc</c> entity has a mandatory <c>id</c> attribute which should be seen |
294 | Each <c>doc</c> entity has a mandatory <c>fileid</c> attribute, which refers to |
| 293 | as a primary key for the document. |
295 | the <c>id</c> attribute of a <c>file</c> entity corresponding with the main file |
| 294 | </p> |
296 | for the document. |
| 295 | |
|
|
| 296 | <p> |
297 | </p> |
| 297 | Inside each <c>doc</c> entity, at least one entity should be available: the |
298 | |
| 298 | <c>fileid</c> entity, which refers to the <c>id</c> attribute of a <c>file</c> |
|
|
| 299 | entity corresponding with the main file for the document. |
|
|
| 300 | </p> |
299 | <p> |
| 301 | |
300 | In case of a handbook chapter, the <c>doc</c> entity must contain a |
| 302 | <p> |
301 | <c>bookref</c> entity which references the main handbook page (the top handbook |
| 303 | In case of a handbook chapter, one must refer to the main handbook page (the top |
302 | XML file). This entity then contains two attributes, called <c>vpart</c> and |
| 304 | handbook XML file). The <c>fileid</c> entity then contains two additional |
303 | <c>vchap</c> which refer to the corresponding part and chapter of the document |
| 305 | parameters, called <c>vpart</c> and <c>vchap</c> which refer to the |
304 | inside the handbook. |
| 306 | corresponding part and chapter of the document inside the handbook. |
|
|
| 307 | </p> |
305 | </p> |
| 308 | |
306 | |
| 309 | <p> |
307 | <p> |
| 310 | Inside the <c>doc</c> entity, two other entities are possible: |
308 | Inside the <c>doc</c> entity, two other entities are possible: |
| 311 | </p> |
309 | </p> |
| … | |
… | |
| 324 | generated index page. |
322 | generated index page. |
| 325 | </li> |
323 | </li> |
| 326 | </ul> |
324 | </ul> |
| 327 | |
325 | |
| 328 | <pre caption="Example Docs entity"> |
326 | <pre caption="Example Docs entity"> |
| 329 | <docs> |
327 | <![CDATA[<docs> |
| 330 | <doc id="handbook_x86"> |
328 | <doc fileid="ldap-howto"> |
| 331 | <memberof>install_guides</memberof> |
329 | <memberof>sysadmin_specific</memberof> |
| 332 | <fileid>handbook-x86</fileid> |
330 | <bugs> |
| 333 | <bugs> |
331 | <bug>102481</bug> |
| 334 | <bug>70753</bug> |
332 | <bug stopper="yes">1151330</bug> |
| 335 | </bugs> |
333 | </bugs> |
| 336 | </doc> |
334 | </doc> |
| 337 | <doc id="portage-intro"> |
335 | <doc fileid="uml"> |
| 338 | <memberof>gentoo_portage</memberof> |
|
|
| 339 | <fileid vpart="2" vchap="1">handbook-x86</fileid> |
|
|
| 340 | </doc> |
|
|
| 341 | <doc id="uml"> |
|
|
| 342 | <memberof>sysadmin_general</memberof> |
336 | <memberof>sysadmin_general</memberof> |
| 343 | <fileid>uml</fileid> |
337 | </doc> |
| 344 | </doc> |
338 | </docs>]]> |
| 345 | </docs> |
339 | </pre> |
|
|
340 | |
|
|
341 | </body> |
|
|
342 | </section> |
|
|
343 | <section> |
|
|
344 | <title>Example metadoc.xml file</title> |
|
|
345 | <body> |
|
|
346 | |
|
|
347 | <p> |
|
|
348 | The Gentoo site uses a <path>metadoc.xml</path> file to aggregate information of |
|
|
349 | all its documentation. You can view the current version one <uri |
|
|
350 | link="/doc/en/metadoc.xml?passthru=1">online</uri>. |
| 346 | </pre> |
351 | </p> |
| 347 | |
352 | |
| 348 | </body> |
353 | </body> |
| 349 | </section> |
354 | </section> |
| 350 | </chapter> |
355 | </chapter> |
| 351 | |
356 | |