Description

moin still relies on the PyXML software, which has seen it's latest release year's ago. please replace this dependency by using the standard python xml library, or some maintained library like lxml or 4suite.

Component selection

Details

MoinMoin Version

OS and Version

Python Version

Server Setup

Server Details

Language you are using the wiki in (set in the browser/UserPreferences)

Workaround

Discussion

DocBook formatter requires python-xml, even under python 2.5 (see MoinMoinDependencies and MoinMoin/formatter/text_docbook.py )

Here is an early patch: no-pythonxml.patch, based on Stefano Zacchiroli's patch. Your feedback is welcome -- FranklinPiat 2009-10-08 21:36:58 :

Thanks for the patch, but can you please tell what the state of affairs is after your patch? What works, what not? -- ThomasWaldmann 2009-10-08 22:17:00

Known bugs/problems

XML parsers refuse to parse plain text

Dropping 4suite ?

Since python "now" have a proper xml implementations we might want to drop 4suite's Ft.Xml.Domlette, and use xml.minidom instead.

However, minidom requires a valid XML file as input. (But moinmoin currently produces HTML4 layout, not XHTML : some macro don't close paragraph tags <p>...</p>). As a workaround, we can sanitize generated code with BeautifulSoup.

See the *no-4suite*.patch patches above.

The DocBook files generated by both parsers are very similar, see diff

Entities

At some stage I had the impression that <<RandomQuote>> returned html entities that weren't handled properly. This needs to be tested (confirmed).

Patches

There are two series of patch, exploring two alternatives:

1. Using 4suite

This patch attempts to use the current dependencies (python 4suite).

2. Using minidom + BeautifulSoup

Python>=2.4 (?) has XML/DOM implementation. So it should be possible to

3. Using minidom only

The above patch uses BeautifulSoup to cleanup the xml code generated by the script itself (!).

Plan


CategoryMoinMoinNoBug

MoinMoin: MoinMoinBugs/DependencyOnOrphanedPythonXML (last edited 2010-02-04 23:25:37 by 241)