← Prev in month ← Prev in thread

Showing DocBook structure as ASCII-art

From
Paul Millar <>
Date
2010-10-18T10:19:56+00:00
ID
Thread
Showing DocBook structure as ASCII-art
Hi all,

After a recent complaint from a college that it's difficult to see a chapter's 
structure with all these XML tags, I wrote a simple XSLT to render a DocBook's 
main structural elements as ASCII-art.

The stylesheet is currently limited to DocBook v4.x, but I'd imagine adding 
the XML namespace shouldn't be too difficult.

In case it's useful for others, I've made the stylesheet publicly available.  
You can get it from here:

	http://www.desy.de/~paul/DocBook/ascii-art.xsl

Alternatively, you can use the sheet directly; for example:

xsltproc http://www.desy.de/~paul/DocBook/ascii-art.xsl my-document.xsl

An "--xinclude" option may be included,  depending on the situation and what 
you wish to visualise.

The stylesheet takes some parameters that tweak the output slightly; see the 
top of the document for details.

HTH,

Paul.
← Prev in month ← Prev in thread