[XML-SIG] [ pyxml-Bugs-912327 ] HTMLDocument and HTMLElement upper
case attributes sometimes
SourceForge.net
noreply at sourceforge.net
Mon Mar 8 17:27:10 EST 2004
Bugs item #912327, was opened at 2004-03-08 22:27
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=106473&aid=912327&group_id=6473
Category: DOM
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Murray Steele (murraysteele)
Assigned to: Nobody/Anonymous (nobody)
Summary: HTMLDocument and HTMLElement upper case attributes sometimes
Initial Comment:
xml.dom.html.HTMLDocument overrides createAttribute of
xml.dom.Document to create an attribute with an
uppercase version of the attribute name passed in.
xml.dom.html.HTMLElement then overrides getAttribute,
getAttributeNode, hasAttribute, removeAttribute and
setAttribute of xml.dom.Element to look for attributes
with an uppercase name. So far so good (bug: 555303
not-with-standing).
Unfortunately xml.dom.ext.reader.Sgmlop calls
setAttributeNS (which eventually calls through to
createAttributeNS in xml.dom.Document) to create
attribute nodes on the HTMLElements. This neatly
bypasses the uppercasing done in HTMLDocument and
HTMLElement and means that none of the neat
htmlanchorelement.href attribute references work. Shame :(
Seems like the simple fix is to add createAttributeNS
to HTMLDocument and/or setAttributeNS to HTMLElement
and have these methods pass through to the base class
methods with uppercased names instead. Although it
seems like a more thorough fix would invovle making
sure that all the (get|set)Attribute(.*) methods of the
xml.dom.html objects are made auto-upper-case-magic.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=106473&aid=912327&group_id=6473
More information about the XML-SIG
mailing list