This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2007年10月27日 13:33 by panzi, last changed 2022年04月11日 14:56 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| python-xml-sax-saxutils.zip | panzi, 2007年10月27日 13:33 | |||
| xml.sax.saxutils.patch | panzi, 2007年10月27日 13:34 | |||
| _xmlplus.sax.saxutils.patch | panzi, 2007年10月27日 13:35 | |||
| xml.sax.saxutils.patch | vhata, 2008年05月10日 18:11 | |||
| test.test_sax.py.patch | vhata, 2008年05月10日 18:12 | review | ||
| short_empty_tag.patch | vhata, 2008年05月10日 18:37 | review | ||
| xml_short_empty_elements_py3k.diff | Neil Muller, 2010年07月21日 14:04 | |||
| Messages (16) | |||
|---|---|---|---|
| msg56849 - (view) | Author: Mathias Panzenböck (panzi) * | Date: 2007年10月27日 13:33 | |
I modified xml.sax.saxutils.XMLGenerator, _xmlplus.sax.saxutils.XMLGenerator, and _xmlplus.sax.saxutils.LexicalXMLGenerator so that they do no longer produce those ugly close tags for empty elements, but use the short version. So instead of <empty></empty> you get just <empty/>. :) I used the version of saxutils.py that is shipped with python 2.5.1. |
|||
| msg56850 - (view) | Author: Mathias Panzenböck (panzi) * | Date: 2007年10月27日 13:34 | |
patch for xml/sax/saxutils.py |
|||
| msg56851 - (view) | Author: Mathias Panzenböck (panzi) * | Date: 2007年10月27日 13:35 | |
patch for _xmlplus.sax.saxutils.py |
|||
| msg57202 - (view) | Author: Gabriel Genellina (ggenellina) | Date: 2007年11月07日 15:56 | |
Some (ugly) parsers insist on <container></ container> when the element is not declared to be empty, so this should be optional (the default being generate <container/>) |
|||
| msg66551 - (view) | Author: Jonathan Hitchcock (vhata) | Date: 2008年05月10日 18:11 | |
The attached patch makes this new feature optional, by passing the "empty_element_tag" option to the constructor. |
|||
| msg66552 - (view) | Author: Jonathan Hitchcock (vhata) | Date: 2008年05月10日 18:12 | |
I have also added some unit tests to test the feature with the option turned on, and off - patch attached. |
|||
| msg66556 - (view) | Author: Jonathan Hitchcock (vhata) | Date: 2008年05月10日 18:37 | |
Acting on a comment (with which I agree) that the "empty_elements_tag" wasn't such an obvious name, here's a (combined) patch which uses the name "short_empty_elements" (which was my original gut-feeling idea for the name, before I checked the W3C standard and found that they called them "Empty-Elements tags") instead. |
|||
| msg104573 - (view) | Author: Ken Ganong (ken.ganong) | Date: 2010年04月29日 19:28 | |
This bug is tagged as easy and appears to already have a patch and a test posted from two years ago. What is still to be done here? |
|||
| msg104574 - (view) | Author: Éric Araujo (eric.araujo) * (Python committer) | Date: 2010年04月29日 19:35 | |
I added the "needs review" keyword, to make this easy to find for reviewers, changed the version (new features don’t go in older versions; check if your patches still apply), and added MvL as nosy, since he’s listed as expert for the xml package in py3k/Misc/maintainers.rst |
|||
| msg110591 - (view) | Author: Mark Lawrence (BreamoreBoy) * | Date: 2010年07月17日 18:26 | |
I believe 3.2 is still open for new features. |
|||
| msg111057 - (view) | Author: Neil Muller (Neil Muller) | Date: 2010年07月21日 14:04 | |
Updated version of the patch against current py3k svn (r83022) attached. This is a combined patch, including the previous xml.sax.saxutil changes (including the 'short_empty_elements' keyword) and the new tests. |
|||
| msg111070 - (view) | Author: Mark Lawrence (BreamoreBoy) * | Date: 2010年07月21日 14:35 | |
The patch looks clean to me, applied small edits to change it from git to svn. Changed test_sax got 7 errors on run. Changed saxutils 53 tests all passed. Can this please be committed. |
|||
| msg112979 - (view) | Author: Mark Lawrence (BreamoreBoy) * | Date: 2010年08月05日 14:04 | |
Can a committer look at this please. |
|||
| msg115680 - (view) | Author: Éric Araujo (eric.araujo) * (Python committer) | Date: 2010年09月06日 01:06 | |
Patch looks good to me. |
|||
| msg118861 - (view) | Author: Neil Muller (Neil Muller) | Date: 2010年10月16日 09:34 | |
So what still needs to happen to get this in? Patch still applies to current python 3.2 trunk (r85564). |
|||
| msg118988 - (view) | Author: R. David Murray (r.david.murray) * (Python committer) | Date: 2010年10月17日 22:48 | |
Committed Neil's patch (after adding docs) in r85671. Thanks. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:56:27 | admin | set | github: 45684 |
| 2010年10月17日 22:48:55 | r.david.murray | set | status: open -> closed nosy: + r.david.murray messages: + msg118988 resolution: accepted stage: patch review -> resolved |
| 2010年10月16日 09:34:36 | Neil Muller | set | messages: + msg118861 |
| 2010年09月06日 01:06:27 | eric.araujo | set | messages: + msg115680 |
| 2010年08月05日 14:04:13 | BreamoreBoy | set | messages:
+ msg112979 stage: commit review -> patch review |
| 2010年07月21日 14:35:38 | BreamoreBoy | set | messages:
+ msg111070 stage: patch review -> commit review |
| 2010年07月21日 14:05:02 | Neil Muller | set | files:
+ xml_short_empty_elements_py3k.diff nosy: + Neil Muller messages: + msg111057 |
| 2010年07月17日 18:26:30 | BreamoreBoy | set | nosy:
+ BreamoreBoy messages: + msg110591 versions: + Python 3.2, - Python 3.3 |
| 2010年04月29日 19:35:22 | eric.araujo | set | versions:
+ Python 3.3, - Python 2.5 nosy: + eric.araujo, loewis messages: + msg104574 keywords: + needs review stage: patch review |
| 2010年04月29日 19:28:52 | ken.ganong | set | nosy:
+ ken.ganong messages: + msg104573 |
| 2008年05月10日 18:37:25 | vhata | set | files:
+ short_empty_tag.patch messages: + msg66556 |
| 2008年05月10日 18:12:35 | vhata | set | files:
+ test.test_sax.py.patch messages: + msg66552 |
| 2008年05月10日 18:11:49 | vhata | set | files:
+ xml.sax.saxutils.patch nosy: + vhata messages: + msg66551 |
| 2008年01月20日 20:34:44 | christian.heimes | set | priority: normal keywords: + patch, easy |
| 2007年11月07日 15:56:55 | ggenellina | set | nosy:
+ ggenellina messages: + msg57202 |
| 2007年10月27日 13:35:29 | panzi | set | files:
+ _xmlplus.sax.saxutils.patch messages: + msg56851 |
| 2007年10月27日 13:34:58 | panzi | set | files:
+ xml.sax.saxutils.patch messages: + msg56850 |
| 2007年10月27日 13:33:55 | panzi | create | |