Release 0.9.1: set version number to 0.9.1
[docutils/kirr.git] / sandbox / xml2rst / README
blobe521a8e73a29928e2d9bfd491bc9ecb0c1267896
1 =======
2 xml2rst
3 =======
5 .. contents::
7 What is xml2rst?
8 ================
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_.
15 .. _flavor:
17 Using xml2rst
18 =============
20 `xml2rst` is currently implemented as an XSLT_ stylesheet usable in
21 three flavors:
23 1. ``xml2rst.py``
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,
45    though.
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
51    it.
53 3. ``rst/xml2rst-noexslt.xsl``
55    This version can be processed with every XSLT_ processor like
56    Xalan_ [#deb-xalan]_.
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,
60    though.
62    .. [#deb-xalan] Under Debian based operating systems try ``apt-get
63       install xalan``.
65    Run ``perldoc rst/xml2rst-noexslt.xsl`` for information on how to
66    run it.
68 Availability
69 ============
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/
77 Installation
78 ============
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`.
85 Copyright and license
86 =====================
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.
93 Development
94 ===========
96 Tests
97 -----
99 There are test suites in ``tests*``. Use filterunit_ to run tests.
101 ToDos
102 -----
104 ``xml2rst.xsl`` and ``xml2rst.py`` contain a couple of comments marked
105 with ``TODO`` which contain things which should be done.
107 Plans
108 -----
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/