X hits on this document

363 views

0 shares

1 downloads

0 comments

93 / 142

DocBook

sets of XSLT stylesheets, xmllint, and xsltproc you can validate and recreate an XHTML version of the text. Here's how:

1.

Open handout/getting-started.xml in your text editor. Notice how the file is declared as a DocBook version 4.2 document. Notice how each of the workbook's chapters are defined as entities.

2.

Open a command prompt and change directories to the handout directory of the workbook's distri- bution.

3.

Validate the document: xmllint --noout --valid getting-started.xml . You should get no errors.

4.

Change directories to xslt/docbook-xsl-1.65.1 and browse the contents of the xhtml subdirectory. There you will find docbook.xsl, the root of the XSLT instructions for creating XHTML output.

5.

Change directories back to the handbook directory.

6.

7.

The result should be a file named getting-started.html in the handbook directory. Open the file in your Web browser.

getting-started.html

Transform the raw DocBook files into XHTML: xsltproc ../xslt/docbook-xsl-1.65.1/xhtml/docbook.xsl getting-started.xml

  • -

    o

If your system has make (or nmake on Windows) installed, then you should be able to "make" the vari- ous versions of this work with simple commands such as: 1) make check , 2) make html , and 3) make xhtml . If you have FOP installed (a processor for creating PDF documents from XML input), then you could do make pdf and make all as well. These things are facilitated through the file called Makefile. It's a whole lot easier to use make commands than typing long xsltproc commands.

85

Document info
Document views363
Page views369
Page last viewedFri Dec 02 18:27:18 UTC 2016
Pages142
Paragraphs3126
Words34660

Comments