Skip to content

Commit

Permalink
[Doc] Update DocBook example instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
0x8000-0000 committed Apr 26, 2020
1 parent dbb0760 commit 2904ec2
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 20 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ plugins {
}

group 'net.signbit.samx'
version '0.4.3'
version '0.4.4'

sourceCompatibility = 1.8

Expand Down
32 changes: 13 additions & 19 deletions src/test/resources/docbook/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,38 +6,32 @@ You can run the to_xml converter, using the -r option to set the root element to
Convert test files to DocBook XML:

```shell script
$ tar xf ~/work/samxj/build/distributions/samxj-0.3.6.tar
$ tar xf ~/work/samxj/build/distributions/samxj-0.4.4.tar
$ ls
samxj-0.3.6
$ cd samxj-0.1.8/test/docbook
samxj-0.3.6/test/docbook$ ls
samxj-0.4.4
$ cd samxj-0.4.4/examples/docbook
samxj-0.4.4/examples/docbook$ ls
chapter1.samx chapter2.samx main.samx README.md
samxj-0.3.6/test/docbook$ ../../bin/to_xml -i main.samx -o draft.xml -r book -n http://docbook.org/ns/docbook -v 5.1 --docbook
enable DocBook mode
samxj-0.3.6/test/docbook$ ls draft.xml
samxj-0.4.4/examples/docbook$ ../../bin/to_xml -i main.samx -o draft.xml -r book -n http://docbook.org/ns/docbook -v 5.1 --docbook -s ../../schemas/docbook.rng.gz
Enable DocBook mode
XML output is well-formed
DocBook document validated using Jing
samxj-0.4.4/examples/docbook$ ls draft.xml
draft.xml
```

Validate DocBook v5.1 using Jing:

```shell script
samxj-0.3.6/test/docbook$ wget https://docbook.org/xml/5.1/rng/docbook.rng
samxj-0.3.6/test/docbook$ jing -f docbook.rng foo.xml
[warning] /usr/bin/jing: Unable to locate batik-all in /usr/share/java
```
The converting step also validates the output against the included DocBook schema.

Generate PDF from DocBook XML:

```shell script
samxj-0.3.6/test/docbook$ dblatex draft.xml
samxj-0.4.4/test/docbook$ dblatex draft.xml
Build the book set list...
Build the listings...
XSLT stylesheets DocBook - LaTeX 2e (0.3.11py3)
===================================================
No template matches p in chapter.
No template matches p in section.
No template matches p in chapter.
No template matches p in section.
Stripping NS from DocBook 5/NG document.
Processing stripped document.
Build draft.pdf
'draft.pdf' successfully built
```

0 comments on commit 2904ec2

Please sign in to comment.