[XML-SIG] [ pyxml-Bugs-725010 ] Script text not contained in script element

SourceForge.net noreply@sourceforge.net
Mon, 21 Apr 2003 07:16:33 -0700


Bugs item #725010, was opened at 2003-04-21 10:16
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=725010&group_id=6473

Category: DOM
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: vincent marchetti (vincemarch)
Assigned to: Nobody/Anonymous (nobody)
Summary: Script text not contained in script element

Initial Comment:
This appears in PyXML 0.8.2, the xml.dom.html module

Because the list under the key 'script' in the
dictionary xml.dom.html.HTML_DTD is empty (as defined
in the module), when an html file is parsed into a DOM
tree the contents of a script element appear as a
sibling of the script element, not as a child.

The following fixes this behavior at run -time: (before
parsing file)

...
xml.dom.html.HTML_DTD['script'].append('#PCDATA')
...

My own reading of the HTML 4.01 DTD <a
href="http://www.w3.org/TR/REC-html40/interact/scripts.html#edef-SCRIPT">
indicates this is the correct behavior.

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

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