1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006
|
<?xml version='1.0' encoding='ISO-8859-1'?>
<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
"http://docbook.org/xml/4.1.2/docbookx.dtd"[]>
<article>
<articleinfo>
<title>DocBook XML/SGML verwerking met OpenJade</title>
<authorgroup>
<author>
<firstname>Saqib</firstname>
<surname>Ali</surname>
<affiliation>
<address>
<email>saqib@seagate.com</email>
</address>
</affiliation>
</author>
<author>
<firstname>Vertaald door: Ellen</firstname>
<surname>Bokhorst</surname>
<affiliation>
<address>
<email>bokkie@nl.linux.org</email>
</address>
</affiliation>
</author>
</authorgroup>
<revhistory>
<revision>
<revnumber>v2.0</revnumber>
<date>10-09-2002</date>
<authorinitials>sa</authorinitials>
<revremark>
De sectie toegevoegd over het met behulp van Tomcat+Cocoon
bekijken van de inhoud van DocBook XML 4.1.2
</revremark>
</revision>
<revision>
<revnumber>v1.5</revnumber>
<date>2002-08-11</date>
<authorinitials>sa</authorinitials>
<revremark>
De XML-sectie toegevoegd en het XML-voorbeeldbestand.
</revremark>
</revision>
<revision>
<revnumber>v1.4</revnumber>
<date>2002-08-08</date>
<authorinitials>sa</authorinitials>
<revremark>
Veel waardevolle aanpassingen/correcties aanbevolen door
Lloyd D Budd. Bedankt Lloyd :)
</revremark>
</revision>
<revision>
<revnumber>v1.3</revnumber>
<date>2002-08-02</date>
<authorinitials>sa</authorinitials>
<revremark>
De sectie "Extra bronnen" toegevoegd.
</revremark>
</revision>
<revision>
<revnumber>v1.2</revnumber>
<date>2002-07-23</date>
<authorinitials>sa</authorinitials>
<revremark>
De sectie toegevoegd over het omzetten van HTML naar PDF met
HTMLDOC. Met dank aan Luc De Louw voor de suggestie.
</revremark>
</revision>
<revision>
<revnumber>v1.1</revnumber>
<date>19-07-2002</date>
<authorinitials>KET</authorinitials>
<revremark>Grammaticale fouten gecorrigeerd, processen genummerd</revremark>
</revision>
<revision>
<revnumber>v1.0</revnumber>
<date>29-06-2002</date>
<authorinitials>sa</authorinitials>
<revremark>
Initiële publieke uitgave.
</revremark>
</revision>
</revhistory>
<abstract>
<para>In deze HOWTO wordt uitgelegd hoe OpenJade in te stellen voor
de verwerking van SGML/XML DocBook documenten.</para>
</abstract>
</articleinfo>
<sect1 id="intro"><title>Introductie</title>
<para>Een aantal acroniemen:</para>
<orderedlist>
<listitem><para>SGML - Standard Generalized Markup Language</para></listitem>
<listitem><para>XML - Extensible Markup Language</para></listitem>
<listitem><para>RTF - Rich Text Format</para></listitem>
<listitem><para>HTML - HyperText Markup Language</para></listitem>
<listitem><para>PDF - Portable Document Format</para></listitem>
</orderedlist>
<para> Het doel van dit document is het opzetten van OpenJade om DocBook 3.2
en 4.2 Standaard Generalized Markup Language (SGML) en Extensible
Markup Language (XML) documenten om te zetten in HyperText Markup
Language (HTML), Rich Text Format (RTF) en Portable Document
Format (PDF) documenten.</para>
<sect2 id="copyright"><title>Copyright en Licentie</title>
<para>
Dit document is auteursrechtelijk beschermd 2001 door Saqib Ali.
Het is toegestaan dit document onder de voorwaarden van de GNU Free
Documentation License, versie 1.1 of enige latere versie gepubliceerd
door de Free Software Foundation te kopiëren, distribueren
en of aan te passen; zonder Invariant secties, zonder Front-Cover
teksten, en zonder back-cover teksten. Een kopie van de licentie is
beschikbaar op
<ulink url="http://www.gnu.org/copyleft/fdl.html">http://www.gnu.org/copyleft/fdl.html</ulink>
</para>
</sect2>
<sect2><title>Krediet</title>
<para>Alle lof komt toe aan <emphasis role="strong">Allah</emphasis>, <emphasis role="strong">De heer van de wereld</emphasis>. Alle krediet gaat naar
<emphasis role="strong">Allah</emphasis>.
Alle fouten in dit document liggen aan mijzelf.</para>
<para>Bovendien zou ik graag de volgende mensen willen erkennen voor hun
waardevolle bijdragen aan dit document:</para>
<orderedlist>
<listitem><para>Greg Ferguson <email>gferg (at) hoop.timonium.sgi.com</email> - voor de zeer behulpzame aanwijzingen/suggesties op de docbook mailing list</para></listitem>
<listitem><para>Kristin Thomas <email>kristint (at) us.ibm.com</email> - Voor de initiële voorbeschouwing van dit document.</para></listitem>
<listitem><para>Luc de Louw <email>luc@delouw.ch</email> - Voor
suggesties over HTMLDOC (PDF -> HTML)</para></listitem>
<listitem><para>Lloyd D Budd <email>ldp@foolswisdom.org</email> -
Voor suggesties ter verbetering van de meeste secties
in dit document</para></listitem>
</orderedlist>
</sect2>
<sect2><title>Wat is DocBook?</title>
<para>
DocBook is een document type definitie (DTD). In een DTD wordt de
syntax van een document gedefinieerd.
DocBook beschrijft de in technische documenten te gebruiken typen structuren
en formaten. Het wordt over het algemeen gebruikt vanwege zijn
eenvoud en volledigheid.
</para>
<para>
In een DTD wordt de syntax van een document gedefinieerd.
In wezen bestaat het uit een boek met regels waarin de set tags
en attributen worden beschreven die zullen worden gebruikt om
specifieke soorten inhoud te beschrijven. Dus DocBook is een
boek met regels welke wordt gebruikt voor het schrijven van
documenten. Elke TAG die wordt gebruikt bij het schrijven van
een document, moet zeer specifiek en formeel worden gedefinieerd
in de DTD.
</para>
</sect2>
<sect2><title>Wat is DSSSL?</title>
<para>In een Document Style Semantics and Specification Language (DSSSL)
wordt gedefinieerd hoe een Standard Generalized Markup Language
(SGML) document in een voor mensen leesbaar formaat wordt
omgezet. </para>
</sect2>
<sect2><title>Wat hebben we nodig?</title>
<para>De benodigde tools om met OpenJade SGML en XML om te zetten, zijn:
</para>
<itemizedlist>
<listitem><para>OpenJade</para></listitem>
<listitem><para>Entities</para></listitem>
<listitem><para>Norman Walsh's DSSSL</para></listitem>
<listitem><para>DocBook DTDs</para></listitem>
<listitem><para>LDP DSL</para></listitem>
<listitem><para>Norman Walsh's XSL</para></listitem>
<listitem><para>LDP XSL</para></listitem>
</itemizedlist>
<note><title>Noot</title>
<para>Deze packages zijn vanaf het net vrij te downloaden. In het
volgende hoofdstuk wordt uitgelegd hoe deze packages
te downloaden.</para>
</note>
</sect2>
<sect2><title>Veronderstellingen</title>
<para>In dit document wordt verondersteld dat je het volgende reeds op je
systeem hebt geïnstalleerd:
</para>
<itemizedlist>
<listitem><para>gzip - beschikbaar vanaf<ulink url="http://www.gnu.org">http://www.gnu.org</ulink></para></listitem>
<listitem><para>gcc en GNU make - beschikbaar vanaf <ulink url="http://www.gnu.org">http://www.gnu.org</ulink></para></listitem>
</itemizedlist>
</sect2>
</sect1>
<sect1 id="requirements"><title>Benodigdheden</title>
<para>Je hoeft slechts één package (OpenJade) te
downloaden en compileren. In deze HOWTO wordt het
compilatieproces uitgelegd, maar er wordt verwacht dat je
reeds ervaring hebt met een installatie vanuit de
broncode.
</para>
<para>De meeste packages die we nodig hebben, zijn de vinden op de website van
<ulink url="http://www.tldp.org/authors/index.html#resources">Het Linux Documentatie Project (TLDP)</ulink></para>
<sect2><title>Voorbereiding</title>
<para>
Maak een directory <filename class="directory">/tmp/downloads</filename> aan.
We zullen deze directory gebruiken om de broncode die we gaan
downloaden in op te slaan.
</para>
</sect2>
<sect2><title>OpenJade</title>
<para>OpenJade zal worden gebruikt om DocBook documenten te verwerken.
OpenJade kan worden gedownload vanaf:
<ulink url="http://openjade.sourceforge.net/">http://openjade.sourceforge.net/</ulink>.
</para>
<para>Op moment van schrijven is OpenJade 1.3.1 beschikbaar. Download het
openjade-1.3.x.tar.gz bestand.</para>
</sect2>
<sect2><title>DocBook DTD</title>
<para>Alle DocBook DTD's zijn beschikbaar vanaf de website van
het Linux Documentatie Project op
<ulink url="http://www.tldp.org/authors/index.html#resources">http://www.tldp.org/authors/index.html#resources</ulink></para>
<para>Download <ulink url="http://www.tldp.org/authors/tools/docbk41.zip">DocBook SGML v4.1</ulink>, <ulink url="http://www.tldp.org/authors/tools/docbk31.zip">DocBook SGML v3.1</ulink>, en <ulink url="http://www.tldp.org/authors/tools/docbkx412.zip">DocBook XML v4.1.2</ulink>
</para>
<note><title>Noot</title>
<para>Download alsjeblieft alle zip-archieven.</para>
</note>
</sect2>
<sect2><title>ISO-entiteiten</title>
<para>
<ulink url="http://www.tldp.org">Het Linux Documentatie Project</ulink> heeft voor het gemak van de gebruikers alle entiteiten in één
groot tar-bestand verpakt en dit geplaatst op
<ulink url="http://www.tldp.org/authors/tools/entities.tar.gz">http://www.tldp.org/authors/tools/entities.tar.gz</ulink>. Met dank aan de TLDP.
</para>
</sect2>
<sect2><title>DSSSL van Norman Walsh</title>
<para>DSSSL van Norman Walsh kan worden gedownload vanaf de website van het
DocBook project op <ulink url="http://sourceforge.net/project/showfiles.php?group_id=21935">http://sourceforge.net/project/showfiles.php?group_id=21935</ulink>.
</para>
<para>
Tijdens dit schrijven was docbook-dsssl-1.76 beschikbaar.
</para>
</sect2>
<sect2><title>Door de LDP aangepaste DSL-stylesheets</title>
<para>
LDP DSL is een aangepaste stylesheet welke wordt gebruikt door
<ulink url="http://www.tldp.org">het Linux Documentatie Project (TLDP)</ulink>. Het is een uitbreiding op DSSSL van Norman Walsh. Het voegt het een
en ander toe, zoals een achtergrond en een inhoudsopgave. Het kan
worden gedownload vanaf
<ulink url="http://www.tldp.org/authors/tools/ldp.dsl">http://www.tldp.org/authors/tools/ldp.dsl</ulink>.
</para>
<para>Voor ldp.dsl is DSSSL nodig van Norman Walsh</para>
</sect2>
<sect2><title>HTMLDOC (optioneel)</title>
<para>HTMLDOC kan worden gebruikt voor het omzetten van HTML in PDF.
Als je PDF documenten wilt kunnen produceren, download dan
HTMLDOC vanaf
<ulink url="http://www.easysw.com/htmldoc/software.php">http://www.easysw.com/htmldoc/software.php</ulink>
</para>
</sect2>
<sect2><title>Norman Walsh's XSL (optioneel)</title>
<para>Dit is niet noodzakelijk. Maar als je met Tomcat+Cocoon
DocBook 4.1.2 XML wilt kunnen bekijken, dan zul je de
XML stylesheets van Norman Walsh nodig hebben.
</para>
<para>De Stylesheets kunnen worden gedownload vanaf <ulink url="http://sourceforge.net/projects/docbook/">http://sourceforge.net/projects/docbook/</ulink></para>
<para>Download het package genaamd docbook-xsl</para>
</sect2>
<sect2><title>Door de LDP aangepaste XSL (optioneel)</title>
<para>Download tevens de door de LDP aangepaste XML vanaf <ulink url="http://www.tldp.org/authors/tools/ldp-xsl.zip">http://www.tldp.org/authors/tools/ldp-xsl.zip</ulink></para>
</sect2>
</sect1>
<sect1 id="inst-openjade"> <title>Installeren van de verwerkingstools - OpenJade</title>
<para>In deze sectie zullen we alle tools in de juiste directory's
installeren. Alle tools komen terecht in de directory
<filename class="directory">/usr/local/dbtools/</filename>. Maak deze
directory met de volgende opdracht aan:
</para>
<screen>
<command>mkdir /usr/local/dbtools</command>
</screen>
<sect2><title>OpenJade installeren</title>
<para>Dit proces is het makkelijke deel, maar het kost wel de
meeste tijd. Houdt in gedachten dat het lang duurt eer
OpenJade is gecompileerd. Voltooi de volgende stappen om
OpenJade te installeren:
</para>
<orderedlist>
<listitem>
<para>Ga naar de directory <filename
class="directory">/tmp/downloads</filename>.
</para>
<screen>
<command># cd /tmp/downloads</command>
</screen>
</listitem>
<listitem>
<para>Decomprimeer het bestand.
</para>
<screen>
<command># gzip -d openjade-1.3.x.tar.gz</command>
</screen>
</listitem>
<listitem>
<para>Pak het archief uit.</para>
<screen>
<command># tar -xvf openjade-1.3.x.tar</command>
</screen>
</listitem>
<listitem>
<para>Ga naar de directory <filename class="directory">openjade-1.3</filename></para>
<screen>
<command># cd openjade-1.3.x</command>
</screen>
</listitem>
<listitem>
<para>Start de opdracht <command>./configure</command>.</para>
<screen>
<command># ./configure
--prefix=/usr/local/dbtools/openjade</command>
</screen>
</listitem>
<listitem>
<para>Start de opdracht <command>make</command>.</para>
<screen>
<command># make</command>
</screen>
</listitem>
<listitem>
<para>Voer de opdracht <command>make install</command> uit. Na deze stap zullen de openjade binary's worden geïnstalleerd onder
<filename class="directory">/usr/local/dbtools/openjade</filename>.</para>
<screen>
<command># make install</command>
</screen>
</listitem>
<listitem>
<para>Kopieer de directory <filename class="directory">dsssl</filename>
vanuit <filename
class="directory">/tmp/downloads/openjade-1.3.x naar
/usr/local/dbtools/openjade</filename>
</para>
<screen>
<command># cp -dpR dsssl /usr/local/dbtools/openjade/</command>
</screen>
</listitem>
</orderedlist>
</sect2>
<sect2><title>DSSSL van Norman Walsh installeren</title>
<para>
In deze stap zullen we DSSSL van Norman Walsh op de juiste lokatie
gaan installeren. De DSSSL hoeft niet te worden gecompileerd.
</para>
<orderedlist>
<listitem>
<para>Ga naar de directory <filename class="directory">/tmp/downloads</filename></para>
<screen>
<command># cd /tmp/downloads</command>
</screen>
</listitem>
<listitem>
<para>Decomprimeer het bestand.</para>
<screen>
<command># gzip -d docbook-dsssl-1.76.tar.gz</command>
</screen>
</listitem>
<listitem>
<para>Pak het archief uit.</para>
<screen>
<command># tar -xvf docbook-dsssl-1.76.tar</command>
</screen>
</listitem>
<listitem>
<para>Verplaats het bestand naar <filename
class="directory">/usr/local/dbtools/docbook-dsssl</filename>.</para>
<screen>
<command># mv docbook-dsssl-1.76 /usr/local/dbtools/docbook-dsssl</command>
</screen>
</listitem>
</orderedlist>
</sect2>
<sect2><title>DocBook DTD's installeren</title>
<para>In deze sectie zullen we de DocBook DTD's installeren.
</para>
<orderedlist>
<listitem>
<para>Ga naar de directory <filename class="directory">/usr/local/dbtools</filename>.</para>
<screen>
<command># cd /usr/local/dbtools</command>
</screen>
</listitem>
<listitem>
<para>Maak nieuwe directory's genaamd <filename class="directory">dtd3.1</filename> <filename class="directory">dtd4.1</filename> <filename class="directory">dtd4.1.2</filename> aan.</para>
<screen>
<command># mkdir dtd3.1</command>
<command># mkdir dtd4.1</command>
<command># mkdir dtd4.1.2</command>
</screen>
</listitem>
<listitem>
<para>Ga naar de directory <filename class="directory">dtd3.1</filename>.</para>
<screen>
<command># cd dtd3.1</command>
</screen>
</listitem>
<listitem>
<para>Decomprimeer het bestand DocBook SGML v3.1 in deze directory.</para>
<screen>
<command># unzip /tmp/downloads/docbk31.zip</command>
</screen>
</listitem>
<listitem>
<para>Ga naar de directory <filename class="directory">dtd4.1</filename>.</para>
<screen>
<command># cd ../dtd4.1</command>
</screen>
</listitem>
<listitem>
<para>Decomprimeer het bestand DocBook SGML v4.1 in deze directory.</para>
<screen>
<command># unzip /tmp/downloads/docbk41.zip</command>
</screen>
</listitem>
<listitem>
<para>Ga naar de directory <filename class="directory">dtd4.1.2</filename>.</para>
<screen>
<command># cd ../dtd4.1.2</command>
</screen>
</listitem>
<listitem>
<para>Decomprimeer het bestand DocBook XML v4.1.2 in deze directory.</para>
<screen>
<command># unzip /tmp/downloads/docbk412.zip</command>
</screen>
</listitem>
</orderedlist>
</sect2>
<sect2><title>ISO-entiteiten installeren</title>
<para>In deze sectie zullen we de ISO-entiteiten installeren die we
downloadde vanaf de LDP-website.</para>
<para>Als eerste installeren we de ISO-entiteiten voor de 3.1 SGML DTD</para>
<orderedlist>
<listitem>
<para>Ga naar de directory <filename
class="directory">/usr/local/dbtools/dtd3.1</filename>.</para>
<screen>
<command># cd /usr/local/dbtools/dtd3.1</command>
</screen>
</listitem>
<listitem>
<para>Kopieer <filename>/tmp/download/entities.tar.gz</filename>
naar deze directory.</para>
<screen>
<command># cp /tmp/download/entities.tar.gz .</command>
</screen>
</listitem>
<listitem>
<para>Decomprimeer het bestand.</para>
<screen>
<command># gzip -d entities.tar.gz</command>
</screen>
</listitem>
<listitem>
<para>Pak het archief uit.</para>
<screen>
<command># tar -xvf entities.tar</command>
</screen>
</listitem>
</orderedlist>
<para>Vervolgens installeren we de ISO-entiteiten voor de 4.1 SGML DTD</para>
<orderedlist>
<listitem>
<para>Ga naar de directory <filename
class="directory">/usr/local/dbtools/dtd4.1</filename>.</para>
<screen>
<command># cd /usr/local/dbtools/dtd4.1</command>
</screen>
</listitem>
<listitem>
<para>Kopieer <filename>/tmp/download/entities.tar.gz</filename>
naar deze directory.</para>
<screen>
<command># cp /tmp/download/entities.tar.gz .</command>
</screen>
</listitem>
<listitem>
<para>Decomprimeer het bestand.</para>
<screen>
<command># gzip -d entities.tar.gz</command>
</screen>
</listitem>
<listitem>
<para>Pak het archief uit.</para>
<screen>
<command># tar -xvf entities.tar</command>
</screen>
</listitem>
</orderedlist>
</sect2>
<sect2><title>Installeren van de LDP DSL</title>
<para>Als laatste installeren we ldp.dsl.</para>
<orderedlist>
<listitem>
<para>Ga naar de directory <filename
class="directory">/tmp/download</filename>.</para>
<screen>
<command># cd /tmp/download </command>
</screen>
</listitem>
<listitem>
<para>Kopieer het bestand <filename>ldp.dsl</filename> naar de
directory <filename class="directory"> /usr/local/dbtools/docbook-dsssl/print/ldp.dsl</filename>.</para>
<screen>
<command># cp ldp.dsl /usr/local/dbtools/docbook-dsssl/print/ldp.dsl</command>
</screen>
</listitem>
<listitem>
<para>>Kopieer het bestand <filename>ldp.dsl</filename> naar de
directory
<filename class="directory">
/usr/local/dbtools/docbook-dsssl/html/ldp.dsl</filename>.
</para>
<screen>
<command># cp ldp.dsl /usr/local/dbtools/docbook-dsssl/html/ldp.dsl</command>
</screen>
</listitem>
</orderedlist>
</sect2>
<sect2><title>HTMLDOC installeren</title>
<para>Deze stap is optioneel. Ze is alleen nodig als je PDF documenten
wilt produceren.</para>
<para>Keer terug naar de directory downloads</para>
<screen>
<command># Ga naar de directory /tmp/download</command>
</screen>
<para>Pak de broncode voor HTMLDOC uit</para>
<screen>
<command># gzip -d htmldoc-1.8.xx-source.tar.gz </command>
<command># tar -xvf htmldoc-1.8.xx-source.tar </command>
<command># cd htmldoc-1.8.xx-1</command>
</screen>
<para>Start configure om de installatielokatie te configureren</para>
<screen>
<command># ./configure --prefix=/usr/local/dbtools/htmldoc</command>
<command># make</command>
</screen>
<para>Tijdens dit schrijven was HTMLDOC versie 1.8.20-1 beschikbaar.
Deze versie had een klein probleem in de fonts Makefile. Het geeft
een foutmelding tijdens het installeren van de fonts, omdat de
juiste fonts niet beschikbaar waren op het systeem.</para>
<para>Tijdens de uitvoering van <command>make install</command> krijg je de
volgende foutmelding:</para>
<screen>
<command># make install</command>
Making all in htmldoc...
Making all in doc...
Installing in fonts...
Installing font files in /usr/local/dbtools/htmldoc/share/htmldoc/fonts...
/bin/cp: cannot stat `ZapfChancery.afm': No such file or directory
/bin/cp: cannot stat `ZapfChancery.pfa': No such file or directory
/bin/cp: cannot stat `ZapfDingbats.afm': No such file or directory
/bin/cp: cannot stat `ZapfDingbats.pfa': No such file or directory
make[1]: *** [install] Error 1
</screen>
<para>Ter correctie van dit installatieprobleem bewerk je
<filename>fonts/Makefile</filename> en plaats je een commentaarteken voor
de regels met verwijzingen naar de ZapfChancery en ZapfDingbats fonts</para>
<para>Voer dan de volgende installatie uit:</para>
<para>
<screen>
<command># make install</command>
Making all in htmldoc...
Making all in doc...
Installing in fonts...
Installing font files in /usr/local/dbtools/htmldoc/share/htmldoc/fonts...
Installing in data...
Installing in doc...
Installing in htmldoc...
</screen>
</para>
</sect2>
</sect1>
<sect1><title>Gebruik van OpenJade</title>
<para>In deze sectie zullen we OpenJade gebruiken om SGML/XML
documenten om te zetten in HTML, RTF en PDF.</para>
<sect2><title>SGML verwerken</title>
<para>Je kunt een SGML DocBook 3.1 voorbeeldbestand downloaden vanaf <ulink url="http://docbook.sc-icc.org/DocBook-OpenJade-SGML-XML-HOWTO.sgml">http://docbook.sc-icc.org/DocBook-OpenJade-SGML-XML-HOWTO.sgml</ulink></para>
<sect3>
<title>De omgevingsvariabele SGML_CATALOG_FILES instellen voor SGML</title>
<para>De omgevingsvariabele SGML_CATALOG_FILES moet zo worden ingesteld dat
het verwijst naar de van toepassing zijnde catalog bestanden.
Gebruik de volgende opdracht om de variabele in te stellen:
</para>
<screen>
<command># export SGML_CATALOG_FILES=/usr/local/dbtools/openjade/dsssl/catalog:/usr/local/dbtools/dtd3.1/docbook.cat:/usr/local/dbtools/docbook-dsssl/catalog</command>
</screen>
</sect3>
<sect3><title>SGML naar HTML</title>
<para>Gebruik de volgende opdracht voor de conversie van SGML naar HTML:
</para>
<screen>
<command># /usr/local/dbtools/openjade/bin/openjade -t sgml -d /usr/local/dbtools/docbook-dsssl/html/ldp.dsl#html DocBook-OpenJade-SGML-XML-HOWTO.sgml </command>
</screen>
<para>Voor het creëren van één geheel HTML-bestand:</para>
<screen>
<command># /usr/local/dbtools/openjade/bin/openjade -V nochunks -t sgml -d /usr/local/dbtools/docbook-dsssl/html/ldp.dsl#html DocBook-OpenJade-SGML-XML-HOWTO.sgml </command>
</screen>
</sect3>
<sect3><title>SGML naar RTF</title>
<para>
Gebruik de volgende opdracht om een SGML-bestand naar het RTF-formaat om te
zetten:
</para>
<screen>
<command># /usr/local/dbtools/openjade/bin/openjade -t rtf -d /usr/local/dbtools/docbook-dsssl/print/ldp.dsl#print DocBook-OpenJade-SGML-XML-HOWTO.sgml </command>
</screen>
</sect3>
</sect2>
<sect2>
<title>XML verwerken</title>
<para>Je kunt een voorbeeldbestand in DocBook 4.1.2 XML downloaden vanaf
<ulink url="http://docbook.sc-icc.org/DocBook-OpenJade-SGML-XML-HOWTO.xml">http://docbook.sc-icc.org/DocBook-OpenJade-SGML-XML-HOWTO.xml</ulink></para>
<sect3><title>Instellen van de omgevingsvariabele SGML_CATALOG_FILES voor XML</title>
<para>De variabele SGML_CATALOG_FILES moet zodanig worden ingesteld, dat het
verwijst naar de juiste catalog bestanden. Gebruik de volgende
opdracht om de variabele in te stellen:
</para>
<screen>
<command># export SGML_CATALOG_FILES=/usr/local/dbtools/openjade/dsssl/catalog:/usr/local/dbtools/dtd4.1.2/docbook.cat:/usr/local/dbtools/docbook-dsssl/catalog</command>
</screen>
</sect3>
<sect3><title>XML naar HTML</title>
<para>
Gebruik de volgende opdracht voor de omzetting van XML naar HTML</para>
<screen>
<command># /usr/local/dbtools/openjade/bin/openjade -t xml -d /usr/local/dbtools/docbook-dsssl/html/ldp.dsl#html /usr/local/dbtools/docbook-dsssl/dtds/decls/xml.dcl DocBook-OpenJade-SGML-XML-HOWTO.xml</command>
</screen>
</sect3>
<sect3><title>XML naar RTF</title>
<para>
Gebruik de volgende opdracht voor de omzetting van XML naar HTML:</para>
<screen>
<command># /usr/local/dbtools/openjade/bin/openjade -t rtf -d /usr/local/dbtools/docbook-dsssl/print/ldp.dsl#print /usr/local/dbtools/docbook-dsssl/dtds/decls/xml.dcl DocBook-OpenJade-SGML-XML-HOWTO.xml</command>
</screen>
</sect3>
</sect2>
<sect2><title>HTML naar PDF (optioneel)</title>
<para>
Om HTML naar PDF om te zetten, moeten we gebruik maken van HTMLDOC. Zet het
SGML-bestand als eerste om in een geheel HTML-uitvoerbestand:</para>
<screen>
<command># /usr/local/dbtools/openjade/bin/openjade -V nochunks -t sgml -d /usr/local/dbtools/docbook-dsssl/html/ldp.dsl#html DocBook-OpenJade-SGML-XML-HOWTO.sgml </command>
</screen>
<para>Voer dan HTMLDOC uit om PDF te produceren:</para>
<screen>
<command># /usr/local/dbtools/htmldoc/bin/htmldoc -f outfile.pdf input.html</command>
</screen>
</sect2>
</sect1>
<sect1><title>DocBook 4.1.2 XML bekijken via een webbrowser</title>
<para>Er zijn 3 manieren om DocBOok 4.1.2 XML vanuit een webserver te bekijken:
</para>
<itemizedlist>
<listitem><para>Voorverwerkt met OpenJade, XSLT</para></listitem>
<listitem><para>Via scripts - PHP, Perl, Python</para></listitem>
<listitem><para>Applicatieserver - Cocoon</para></listitem>
</itemizedlist>
<para>Het gebruik van een applicatieserver, zoals Cocoon is de beste optie.
In deze sectie zullen we zien hoe we DocBook 4.1.2 XML bestanden met
Cocoon+Tomcat kunnen tonen.</para>
<sect2>
<title>Tomcat + Cocoon</title>
<para>Tomcat is de Java Servlet Container. Kijk voor meer informatie op
<ulink url="http://jakarta.apache.org/tomcat/index.html">http://jakarta.apache.org/tomcat/index.html</ulink></para>
<para>Apache Cocoon is een XML publishing framework. Kijk voor meer informatie
op <ulink url="http://xml.apache.org/cocoon/index.html">http://xml.apache.org/cocoon/index.html</ulink></para>
<para>In deze HOWTO zal niet worden ingegaan op details nodig voor het
instellen van Cocoon+Tomcat, aangezien dit reeds wordt uitgelegd op
@ <ulink url="http://xml.apache.org/cocoon/installing/index.html">http://xml.apache.org/cocoon/installing/index.html</ulink>.
In instellen van Tomcat+Cocoon is niet moeilijk en het zou in minder
dan 5 minuten moeten kunnen.</para>
<para>Zodra je Cocoon + Tomcat werkend hebt, volg je de volgende secties
om de inhoud van DocBook 4.1.2 XML in een browser te kunnen bekijken.
</para>
</sect2>
<sect2><title>XSL van Norman Walsh installeren</title>
<para>In deze stap zullen we XSL van Norman Walsh installeren onder
<filename class="directory">/usr/local/dbtools/</filename>.</para>
<para>Ga naar de directory <filename class="directory">/tmp/downloads</filename>en pak het archiefbestand docbook-xsl uit.</para>
<screen><command># cd /tmp/downloads/</command></screen>
<screen><command># gzip -d docbook-xsl-1.53.0.tar.gz</command></screen>
<screen><command># tar -xvf docbook-xsl-1.53.0.tar</command></screen>
<para>Verplaats voor de installatie van docbook-xsl de bestanden naar de
directory <filename class="directory">/usr/local/dbtools</filename></para>
<screen><command># mv docbook-xsl-1.53.0 /usr/local/dbtool/docbook-xsl</command></screen>
<para>Installeer dan de LDP XSL</para>
</sect2>
<sect2><title>LDP XSL installeren</title>
<para>Decomprimeer het bestand <filename>ldp-xs.zip</filename> en kopieer alle
bestanden naar de directory
<filename class="directory">/usr/local/dbtools/docbook-xsl/html</filename>.</para>
<screen><command># cd /tmp/downloads</command></screen>
<screen><command># unzip ldp-xs.zip</command></screen>
<screen><command># mv ldp-html*.xsl /usr/local/dbtools/docbook-xsl/html</command></screen>
<para>Bewerk vervolgens het bestand <filename>/usr/local/dbtools/docbook-xsl/html/ldp-html.xsl</filename> om het pad voor het importbestand in te stellen.
</para>
<screen><command># vi /usr/local/dbtools/docbook-xsl/html/ldp-html.xsl</command></screen>
<para>wijzig:</para>
<screen>import href="/usr/share/sgml/docbook/docbook-xsl-1.44/html/docbook.xsl"</screen>
<para>in:</para>
<screen>import href="/usr/local/dbtools/docbook-xsl/html/docbook.xsl"</screen>
</sect2>
<sect2><title>Instellen van sitemap.xmap</title>
<para>$COCOON_HOME verwijst naar de Cocoon Web Application Directory.
Dit is de directory <filename class="directory">/usr/local/jakarta-tomcat-4.1.9/webapps/cocoon/</filename></para>
<para>Maak een directory met de naam <filename class="directory">docbook</filename> aan onder <filename class="directory">$COCOON_HOME/mount</filename>.
Hier zullen we alle DocBook XML 4.1.2 inhoud gaan plaatsen.</para>
<screen><command># mkdir $COCOON_HOME/mount/docbook</command></screen>
<para>Maak een bestand sitemap.xmap aan in de directory
<filename class="directory">$COCOON_HOME/mount/docbook</filename>
met de volgende inhoud:</para>
<screen><command># cd $COCOON_HOME/mount/docbook</command></screen>
<screen><command># vi sitemap.xmap</command></screen>
<screen>
<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
<!-- gebruik de standaardcomponenten -->
<map:components>
<map:generators default="file"/>
<map:transformers default="xslt"/>
<map:readers default="resource"/>
<map:serializers default="html"/>
<map:selectors default="browser"/>
<map:matchers default="wildcard"/>
<map:transformers default="xslt"/>
</map:components>
<map:pipelines>
<map:pipeline>
<map:match pattern="">
<map:generate src="samples.xml"/>
<map:transform src="/usr/local/jakarta-tomcat-4.1.9/webapps/cocoon/mount/editor/stylesheets/simple-page2html.xsl"/>
<map:serialize/>
</map:match>
<!-- reageer op *.html verzoeken met
onze docs verwerkt door .xsl -->
<map:match pattern="*.html">
<map:generate src="{1}.xml"/>
<map:transform src="/usr/local/dbtools/docbook-xsl/html/ldp-html.xsl"/>
<map:serialize type="html"/>
</map:match>
<!-- later, reageer op *.pdf verzoeken met
onze docs verwerkt door doc2pdf.xsl -->
<map:match pattern="*.pdf">
<map:generate src="{1}.xml"/>
<map:transform src="/usr/local/dbtools/docbook-xsl/fo/docbook.xsl"/>
<map:serialize type="fo2pdf"/>
</map:match>
<map:match pattern="*.xml">
<map:generate src="{1}.xml"/>
<map:serialize type="xml"/>
</map:match>
</map:pipeline>
</map:pipelines>
</map:sitemap>
</screen>
</sect2>
<sect2>
<title>Inhoud van een DocBook 4.1.2 XML bestand bekijken vanuit een webbrowser</title>
<para>Plaats een DocBook 4.1.2 XML-bestand in
<filename class="directory">$COCOON_HOME/mount/docbook/</filename></para>
<para>Een voorbeeldbestand is beschikbaar vanaf
<ulink url="http://docbook.sc-icc.org/sample.xml">http://docbook.sc-icc.org/sample.xml</ulink></para>
<para>Nu kun je het document benaderen vanuit een browser @ http://localhost:8080/cocoon/mount/sample.html (HTML) of http://localhost:8080/cocoon/mount/sample.pdf (PDF)</para>
</sect2>
</sect1>
<sect1><title>Verdere informatie</title>
<para>In deze sectie staan een aantal verwijzingen naar gerelateerde
bronnen op het internet.</para>
<para> Als je aanbevelingen hebt voor extra bronnen in deze sectie, stuur me
dan alsjeblieft een mail @ <email> saqib@seagate.com</email>.
Bedankt.</para>
<sect2><title>Nieuwsgroepen</title>
<para>Een aantal van belang zijnde nieuwsgroepen:</para>
<orderedlist>
<listitem><para>comp.text.sgml (makkelijk toegankelijk vanaf <ulink url="http://www.deja.com">http://www.deja.com</ulink>)</para></listitem>
<listitem><para>comp.text.xml (makkelijk toegankelijk vanaf <ulink url="http://www.deja.com">http://www.deja.com</ulink>)</para></listitem>
<listitem><para>htmldoc.general (server - nttp://news.easysw.com)</para></listitem>
</orderedlist>
</sect2>
<sect2><title>Mailinglijsten</title>
<para>Hier zijn een aantal relevante mailinglijsten</para>
<orderedlist>
<listitem><para>DocBook mailing list @ OASIS. Ga naar <ulink url="http://www.oasis-open.org/committees/docbook/mailinglist/index.shtml">http://www.oasis-open.org/committees/docbook/mailinglist/index.shtml</ulink> voor meer info.</para></listitem>
<listitem><para>DocBook mailing list @ TLDP. Ga naar <ulink url="http://www.tldp.org/mailinfo.html">http://www.tldp.org/mailinfo.html</ulink> voor meer
info.</para></listitem>
<listitem><para>xml-doc @ Yahoo Groups. Ga naar <ulink url="http://groups.yahoo.com/group/xml-doc/">http://groups.yahoo.com/group/xml-doc/</ulink> voor meer
info.</para></listitem>
</orderedlist>
</sect2>
<sect2><title>IRC</title>
<orderedlist>
<listitem><para>DocBook IRC Channel. #docbook op irc://irc.openprojects.net</para></listitem>
</orderedlist>
</sect2>
<sect2><title>Websites</title>
<orderedlist>
<listitem><para><ulink url="http://www.oasis-open.org/">http://www.oasis-open.org/</ulink> OASIS beheert diverse DocBook DTD's</para></listitem>
<listitem><para><ulink url="http://docbook.org/wiki/moin.cgi/">http://docbook.org/wiki/moin.cgi/</ulink>De DocBook Wiki</para></listitem>
<listitem><para><ulink url="http://www.docbook.org/tdg/en/">http://www.docbook.org/tdg/en/</ulink>Online versie van DocBook: The Definitive Guide</para></listitem>
<listitem><para><ulink url="http://www-106.ibm.com/developerworks/library/l-docbk.html">http://www-106.ibm.com/developerworks/library/l-docbk.html</ulink>A gentle guide to DocBook (zeer goede introductie).</para></listitem>
<listitem><para><ulink url="http://www.tldp.org/LDP/LDP-Author-Guide/index.html">http://www.tldp.org/LDP/LDP-Author-Guide/index.html</ulink>Het Linux Documentatie Project (TLDP) Author Guide</para></listitem>
<listitem><para><ulink url="http://www.tldp.org/authors/index.html#resources">http://www.tldp.org/authors/index.html#resources</ulink>DocBook bronnen geleverd door de TLDP</para></listitem>
</orderedlist>
</sect2>
<sect2><title>Commerciële tools</title>
<orderedlist>
<listitem><para>DocPro van Command Prompt, INC. <ulink url="http://www.commandprompt.com/entry.lxp?lxpe=2">http://www.commandprompt.com/entry.lxp?lxpe=2</ulink></para></listitem>
<listitem><para>YAWC Pro van XML Workshop LTD. <ulink url="http://www.yawcpro.com/">http://www.yawcpro.com/</ulink>. Kan worden gebruikt om MS Word
documenten om te zetten in Simple DocBook XML.
</para></listitem>
<listitem><para>Logictran RTF Converter. <ulink url="http://www.logictran.com/">http://www.logictran.com/</ulink>. Word/RTF naar HTML/XML</para></listitem>
<listitem><para>MajiX - Word naar XML converter. <ulink url="http://tetrasys.dhs.org/">http://tetrasys.dhs.org/</ulink></para></listitem>
<listitem><para>XMETAL van SoftQuad <ulink url="http://www.softquad.com/">http://www.softquad.com/</ulink> </para></listitem>
</orderedlist>
</sect2>
</sect1>
</article>
|