DjVu2xhtml XSL stylesheets
Version 0.10
12-21-03
Questions? Contact Kevin Reiss at kreiss@kinoy.rutgers.edu
Example file is U.N. Resolution 1441 (2002) taken from
http://www.planetdjvu.com on 12-21-03.
Availabe under the GNU Public License, see file gpl.txt
Files:
index.html Overview of Documentation
doc.css Stylesheet for overview
djvu2xshtml.xsl main xsl stylesheet
params.xsl xsl stylesheet containing global parameters
dcappinfo.xsl example xsl stylesheet containing application specific
njardctemplate.xsl second example application specific stylesheet
headers, footers, and metadata processing templates
README This File
NOTES Brief Discussion of project
gpl.txt GNU Public License
example/ Example file taken form http://www.planetdjvu.com at:
http://www.planetdjvu.com/gallery/research_papers/index.djvu
example/RUN Sample command line arguments to run example
example/meta.xml example dublin core metadata file
example/djvuhtml.css CSS stylsheet for XHTML output
example/line.gif Image for example header
example/white.jpg Background Image for Example
example/example.xml DjVu XML instance of example document
example/example.djvu Bundled djvu document of example document
General: This group of stylesheets is designed to work with the output
produced by the djvutoxml [included in version 3.5.12 of thedjvulibre and above] command available in djvulibre when this
command is processed over indirect djvu documents. It should work
with the direct format as well, but that hasn't been thoroughly
tested.
XSLT Processor: These have been tested with xsltproc the command line
front-end to the libxslt library in C for XSLT transformations. You
can find it at http://xmlsoft.org as a part of the libxml project. It
offers superior performance compared to most XSLT processors, these
stylesheets should work with any conformant XSLT 1.0 processor.
Using the stylesheets to process DjVu XML output
1. Edit the global the global parameters in params.xsl to fit your
application.
2. Modify or create application specific templates for metadata
processing, headers, and footers in appinfo.xsl.
3. Run xsltproc at the command line. Sample Commnad:
xsltproc -o path_to_output/index.html djvu2xhtml.xsl path_to_file/index.xml --stringparam metafile path_relative_to_xsl_stylesheet/meta.xml --stringparam --param displaynav 1 --param displayfoot 1 stylesheet djvuxhtml.css
Issues
1. The metafile must be called with a path relative to the location
of the XSL stylesheets NOT the source DjVu XML document
2. The paragraph heuristics can be much improved, the character
counting method is very crude.
TODO:
1. Improved paragraph identification heuristics
2. Experiment with chunking the XHTML docs in seperate docs with an
index document rather than in one large file.
3. Try to process lists, footnotes, endnotes properly
4. Implement a global parameter to govern how much of a document's
footer should be ignored in transformation.
5. Make use of the REGION element in processing, it roughly divides a
djvu page into a header, footer and body region.
6. Implement all of the dublin core fields in appinfo.xsl, currently
only 4 are implemented.
Kevin Reiss 12-21-03