10 `xml2rst` is a tool to generate reStructuredText_ syntax back from
11 `Docutils XML`_ input. This way you can create an XML files using
12 `Docutils XML`_ from some other format (such as ODF_) and then
13 transform the result to reStructuredText_.
20 `xml2rst` is currently implemented as an XSLT_ stylesheet usable in
25 This script uses ``rst/xml2rst.xsl`` through the XSLT_ engine
26 available through the lxml_ package [#deb-lxml]_. It also uses
27 Python callbacks for some advanced functionality.
29 This is the preferred method of using `xml2rst` but depends on the
30 lxml_ package. This is also what is installed normally.
32 .. [#deb-lxml] Under Debian based operating systems try ``apt-get
33 install python-lxml``.
35 Run ``xml2rst --help`` for information on how to run it.
37 2. ``rst/xml2rst-nopy.xsl``
39 This is the core XSLT_ script without using Python. It uses EXSLT_
40 and therefore needs an EXSLT_ capable XSLT_ processors such as
41 xsltproc_ [#deb-xsltproc]_.
43 If you can't use ``xml2rst.py`` because you don't have lxml_ you
44 may try this flavor. This version is no longer actively maintained,
47 .. [#deb-xsltproc] Under Debian based operating systems try
48 ``apt-get install xsltproc``.
50 Run ``perldoc rst/xml2rst-nopy.xsl`` for information on how to run
53 3. ``rst/xml2rst-noexslt.xsl``
55 This version can be processed with every XSLT_ processor like
58 If you can use neither ``xml2rst.py`` nor ``xml2rst-nopy.xsl`` you
59 may try this flavor. This version is no longer actively maintained,
62 .. [#deb-xalan] Under Debian based operating systems try ``apt-get
65 Run ``perldoc rst/xml2rst-noexslt.xsl`` for information on how to
71 `xml2rst` is available through the `Docutils Subversion repository`_
72 as part of the Docutils sandbox in ``sandbox/xml2rst``.
74 Moreover you can fetch it directly from the current maintainer at
75 http://www.merten-home.de/FreeSoftware/xml2rst/
80 After you obtained the package run ``python setup.py install``.
82 Depending on the flavor_ you choose you need to install certain
83 packages to run `xml2rst`.
88 Copyright (C) 2005, 2006 by Stefan Merten and David Priest
89 Copyright (C) 2009, 2010, 2011 by Stefan Merten
91 License is GPL_ v2 or later.
99 There are test suites in ``tests*``. Use filterunit_ to run tests.
104 ``xml2rst.xsl`` and ``xml2rst.py`` contain a couple of comments marked
105 with ``TODO`` which contain things which should be done.
110 ``xml2rst`` should become a normal reStructuredText writer. Starting
111 with V1.0 functionality is moved to a Python based implementation.
113 .. ############################################################################
115 .. _reStructuredText: http://docutils.sourceforge.net/rst.html
117 .. _Docutils XML: http://docutils.sourceforge.net/docs/ref/doctree.html
119 .. _XSLT: http://www.w3.org/TR/1999/REC-xslt-19991116
121 .. _Docutils Subversion repository: http://docutils.sourceforge.net/docs/dev/repository.html
123 .. _xalan: http://xalan.apache.org/
125 .. _GPL: http://www.gnu.org/copyleft/gpl.html
127 .. _ODF: http://www.oasis-open.org/committees/tc_home.php?wg_abbrev=office
129 .. _EXSLT: http://www.exslt.org/
131 .. _xsltproc: http://xmlsoft.org/XSLT/xsltproc2.html
133 .. _lxml: http://codespeak.net/lxml/
135 .. _filterunit: http://www.merten-home.de/FreeSoftware/filterunit/