[XML-SIG] [ pyxml-Bugs-499608 ] XMLWriter attribute ns declaration

noreply@sourceforge.net noreply@sourceforge.net
Fri, 04 Jan 2002 14:16:33 -0800


Bugs item #499608, was opened at 2002-01-04 14:16
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=106473&aid=499608&group_id=6473

Category: SAX
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Nobody/Anonymous (nobody)
Summary: XMLWriter attribute ns declaration

Initial Comment:

In startElementNS of XMLGenerator (in saxutils,
revision 1.29), there's
 
name = prefix + ':' + name[1]
self._out.write(' xmlns:%s=%s' % (prefix,
     quoteattr(name[0])))

This effectively sets the URI in the namespace
declaration to the first character of the chosen prefix.

To fix, one could either change it to

nsURI = name[0]
name = prefix + ";" + name[1]
self._out.write(' xmlns:%s=%s' % (prefix,
      quoteattr(nsURI)))

or one could re-name the 'name' variable appropriately.

Cheers,


----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=106473&aid=499608&group_id=6473