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.

Author Michael.Sulyaev
Recipients Michael.Sulyaev
Date 2011-09-02.10:04:01
SpamBayes Score 0.0016126822
Marked as misclassified No
Message-id <1314957842.78.0.391568748992.issue12883@psf.upfronthosting.co.za>
In-reply-to
Content
I can get not-well-formed XML output (attribute name must not be empty string):

<?xml version="1.0" encoding="iso-8859-1"?>
<root ="v_for_empty_name" k1="v1"></root>

AttributeImpl must ignore dict entries that may not be cast to valid XML attributes.

Code:

#!/usr/bin/python

from xml.sax.xmlreader import AttributesImpl as Attrs
from xml.sax.saxutils import XMLGenerator as Gen

g = Gen()
a = Attrs(dict([('k1','v1'),('','v_for_empty_name')]))
g.startDocument()
g.startElement('root',a)
g.endElement('root')
g.endDocument()
print
History
Date User Action Args
2011-09-02 10:04:02Michael.Sulyaevsetrecipients: + Michael.Sulyaev
2011-09-02 10:04:02Michael.Sulyaevsetmessageid: <1314957842.78.0.391568748992.issue12883@psf.upfronthosting.co.za>
2011-09-02 10:04:02Michael.Sulyaevlinkissue12883 messages
2011-09-02 10:04:01Michael.Sulyaevcreate