OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [docbook-apps] DocBook to text


Hi 

> [...]
> I'm thinking about post-processing the XHTML before letting w3m
> render it to text format. Does anybody have an example XSL file
> for processing DocBook XSLs XHTML, so that I do not need to
> start from zero? Thanks in advance!

Well, I don't know your exact need, but why use the
DocBook stylesheets?

You can create a "reduced" XHTMl output if you set the correct
parameters. I did it with my DocBook files several times.
Maybe you could try it with a DB XSLT stylesheet below and go
from the XHTML output to text:

---------------------------------------------
<xsl:stylesheet version="1.0"
        xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
<xsl:import
href="http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl"/>

<!-- No callout graphics: -->
<xsl:param name="callout.graphics" select="0"/>
<!-- Let appear callouts as Unicode characters: -->
<xsl:param name="callout.unicode" select="0"/>
<!-- Navigation is useless for text output -->
<xsl:param name="suppress.navigation" select="1"></xsl:param>
<!-- Constrain toc for really important elements -->
<xsl:param name="generate.toc">
appendix toc,title
article/appendix nop
article   toc,title
book      toc,title,figure,table,example,equation
set       toc,title
</xsl:param>
</xsl:stylesheet>
---------------------------------------------

Did you also try other text browsers? W3m is one, but there
is also lynx (it seems to have some problems with tables).
You can even save the XHTML to text with Firefox and Opera.


Hope that helps,
Tom



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]