[issue1390] toxml generates output that is not well formed

2008-05-23 Thread Martin v. Löwis
Martin v. Löwis <[EMAIL PROTECTED]> added the comment: Thanks for the patch. Committed as r63563. Because of the new exception, I won't backport the change to 2.5. -- resolution: -> fixed status: open -> closed __ Tracker <[EMAIL PROTECTED]>

[issue1390] toxml generates output that is not well formed

2008-03-19 Thread Thomas Conway
Thomas Conway <[EMAIL PROTECTED]> added the comment: On Thu, Mar 20, 2008 at 8:26 AM, Sean Reifschneider <[EMAIL PROTECTED]> wrote: > > Sean Reifschneider <[EMAIL PROTECTED]> added the comment: > > Martin: What do you think of this patch? Looks fine. __ Tracker

[issue1390] toxml generates output that is not well formed

2008-03-19 Thread Sean Reifschneider
Sean Reifschneider <[EMAIL PROTECTED]> added the comment: Martin: What do you think of this patch? -- assignee: -> loewis nosy: +jafo priority: -> normal __ Tracker <[EMAIL PROTECTED]> _

[issue1390] toxml generates output that is not well formed

2008-02-15 Thread A.M. Kuchling
Changes by A.M. Kuchling: -- keywords: +patch __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyt

[issue1390] toxml generates output that is not well formed

2008-02-12 Thread Thomas Conway
Thomas Conway added the comment: On Feb 13, 2008 6:27 AM, Virgil Dupras <[EMAIL PROTECTED]> wrote: > CDATASection.writexml() already raises ValueError when finding invalid data, > so it seems consistent to me to extend the behavior to Comment.writexml() That looks fine to me. __

[issue1390] toxml generates output that is not well formed

2008-02-12 Thread Virgil Dupras
Virgil Dupras added the comment: I wanted to start contributing to python for quite a while, so here's my very first try (cleaning out old patchless open tickets). So, whatever is the final decision on this, here's a patch. CDATASection.writexml() already raises ValueError when finding invalid

[issue1390] toxml generates output that is not well formed

2007-11-08 Thread Paul Pogonyshev
Paul Pogonyshev added the comment: I think unexpected exception in toxml() is not worse than producing unreadable output. With createComment() it is different, since you can e.g. create a temporary DOM tree only to discard it later and never serialize. __ Tracker

[issue1390] toxml generates output that is not well formed

2007-11-07 Thread Martin v. Löwis
Martin v. Löwis added the comment: The standard procedure for an incompatible change would be to add such a parameter to 2.6, and then change the default behavior in 2.7 (or rather 3.1). Of course, people will not notice the change in 2.6, and then be surprised as much about the default change in

[issue1390] toxml generates output that is not well formed

2007-11-06 Thread Thomas Conway
Thomas Conway added the comment: I think the specification is reasonably clear: createComment may not throw an exception. The serializer must throw an exception. (Personally, I think they have it round the wrong way - every time you write a serializer you have to write code to do the check; if it

[issue1390] toxml generates output that is not well formed

2007-11-06 Thread Martin v. Löwis
Martin v. Löwis added the comment: It may the intention that these functions may raise exceptions in other cases as well - but can you also support that possibility from the text of the DOM spec itself? Adding an exception there may break existing applications, which already have except clauses

[issue1390] toxml generates output that is not well formed

2007-11-06 Thread Paul Pogonyshev
Paul Pogonyshev added the comment: Well, it seems that allows createComment() in minidom to raise something implementation/language specific. I personally would prefer this (e.g. a ValueError) instead of raising on serialization step, as I prefer early error checks, when these checks obviously r

[issue1390] toxml generates output that is not well formed

2007-11-06 Thread Thomas Conway
Thomas Conway added the comment: FWIW, the DOM guys considered mandating a check in createComment, but decided that the performance penalty was too great. I'm not sure I agree with them, but there you have it. Here are links to my query about the issue: http://lists.w3.org/Archives/Public/www-d

[issue1390] toxml generates output that is not well formed

2007-11-06 Thread Martin v. Löwis
Martin v. Löwis added the comment: Would anybody want to provide a patch, then? __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mailing list Unsu

[issue1390] toxml generates output that is not well formed

2007-11-06 Thread Paul Pogonyshev
Paul Pogonyshev added the comment: Looks like bad design on W3 part: postponing an error happening, though it wouldn't be difficult to check right in createComment(). But I guess minidom should still be changed to conform to standard. -- nosy: +_doublep

[issue1390] toxml generates output that is not well formed

2007-11-06 Thread Thomas Conway
Thomas Conway added the comment: The W3 guys had some information that helps. The DOM3 Core specification contains the following No lexical check is done on the content of a comment and it is therefore possible to have the character sequence "--" (double-hyphen) in the content, which is i

[issue1390] toxml generates output that is not well formed

2007-11-05 Thread Thomas Conway
Thomas Conway added the comment: Hi Martin, toxml() is not part of the DOM, so it could be changed to throw an exception. However, I suggest doing nothing, for the moment - I've posted to the dom mailing list at w3, so I'll see what wisdom we get from its members. cheers, Tom

[issue1390] toxml generates output that is not well formed

2007-11-05 Thread Martin v. Löwis
Martin v. Löwis added the comment: I'm not willing to change minidom unless there is precedence of how to deal with this case. So can you find DOM implementations in other languages that meet the DOM spec an still reject your code? __ Tracker <[EMAIL PROTECTED]> <

[issue1390] toxml generates output that is not well formed

2007-11-05 Thread Thomas Conway
Thomas Conway added the comment: Hi Martin, You write: It's not a bug in toxml, which should always serialize the DOM tree if possible. Right! In this case it is *not* possible. The generated serialization is not a well formed XML document. Having just consulted the DOM technical repor

[issue1390] toxml generates output that is not well formed

2007-11-04 Thread Martin v. Löwis
Martin v. Löwis added the comment: It's not a bug in the DOM implementation, as createCommment does not specify an exception in this case. It may be a bug in the W3 DOM specification; please report that to the W3 consortium. It's not a bug in toxml, which should always serialize the DOM tree if

[issue1390] toxml generates output that is not well formed

2007-11-04 Thread Thomas Conway
Thomas Conway added the comment: Either it is a bug in the DOM implementation, which should reject comments containing -->, a bug in toxml() which should refuse to serialize unserializable documents, or it is a bug in the documentation. cheers, Tom __ Tracker <[E

[issue1390] toxml generates output that is not well formed

2007-11-04 Thread Martin v. Löwis
Martin v. Löwis added the comment: That's not a bug in Python, but in your script. You should not pass such a string to createComment. -- nosy: +loewis __ Tracker <[EMAIL PROTECTED]> __ __

[issue1390] toxml generates output that is not well formed

2007-11-04 Thread Thomas Conway
New submission from Thomas Conway: The attached script yields a non-well-formed xml document. Added file: http://bugs.python.org/file8692/bug.py __ Tracker <[EMAIL PROTECTED]> __from xml.dom.minid

[issue1390] toxml generates output that is not well formed

2007-11-04 Thread Thomas Conway
Changes by Thomas Conway: -- components: Library (Lib) nosy: drtomc severity: normal status: open title: toxml generates output that is not well formed type: behavior versions: Python 2.5 __ Tracker <[EMAIL PROTECTED]> _