## Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/wellformed04

<test name='wellformed04' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-3 dom3.xsd'>
<metadata>
<title>wellformed04</title>
<creator>Curt Arnold</creator>
<description> Create a document with an XML 1.1 valid but XML 1.0 invalid attribute and normalize document with well-formed set to false. </description>
<date qualifier='created'>2004-02-24</date>
<subject resource='http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-normalizeDocument'/>
<subject resource='http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-well-formed'/>
</metadata>
<var name='domImpl' type='DOMImplementation'/>
<var name='nullDoctype' type='DocumentType' isNull='true'/>
<var name='doc' type='Document'/>
<var name='docElem' type='Element'/>
<var name='attr' type='Attr'/>
<var name='retval' type='Node'/>
<var name='domConfig' type='DOMConfiguration'/>
<var name='errorMonitor' type='DOMErrorMonitor'/>
<var name='errors' type='List'/>
<var name='error' type='DOMError'/>
<var name='canSet' type='boolean'/>
<var name='nullNS' type='DOMString' isNull='true'/>
<implementation var='domImpl'/>
<createDocument var='doc' obj='domImpl' namespaceURI='"http://www.w3.org/1999/xhtml"' qualifiedName='"html"' doctype='nullDoctype'/>
<documentElement var='docElem' obj='doc'/>
<assertDOMException id='xml10InvalidName'>
<INVALID_CHARACTER_ERR>
<createAttributeNS var='attr' obj='doc' namespaceURI='nullNS' qualifiedName='"LegalNameࢎ"'/>
</INVALID_CHARACTER_ERR>
</assertDOMException>
<try>
<xmlVersion obj='doc' value='"1.1"' interface='Document'/>
<catch>
<DOMException code='NOT_SUPPORTED_ERR'>
<return/>
</DOMException>
</catch>
</try>
<setAttributeNS obj='docElem' namespaceURI='nullNS' qualifiedName='"LegalNameࢎ"' value='"foo"'/>
<xmlVersion obj='doc' value='"1.0"' interface='Document'/>
<domConfig var='domConfig' obj='doc' interface='Document'/>
<canSetParameter var='canSet' obj='domConfig' name='"well-formed"' value='false'/>
<if>
<isTrue value='canSet'/>
<setParameter obj='domConfig' name='"well-formed"' value='false'/>
<setParameter obj='domConfig' name='"error-handler"' value='errorMonitor'/>
<normalizeDocument obj='doc'/>
<allErrors var='errors' obj='errorMonitor'/>
<for-each member='error' collection='errors'>
<assertNull actual='error' id='noErrorsExpected'/>
</for-each>
</if>
</test>

Copyright (c) 2001-2004 World Wide Web Consortium, (Massachusetts Institute of Technology, Institut National de Recherche en Informatique et en Automatique, Keio University). All Rights Reserved. This program is distributed under the W3C's Software Intellectual Property License. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

See W3C License http://www.w3.org/Consortium/Legal/ for more details.