<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?>

<!--

Copyright (c) 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.

-->

<!DOCTYPE test SYSTEM "dom3.dtd">
<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="infoset06">
<metadata>
<title>infoset06</title>
<creator>Curt Arnold</creator>
<description>
Create a document with an XML 1.1 valid but XML 1.0 invalid element and
normalize document with infoset set to true.
</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-infoset"/>
</metadata>
<var name="domImpl" type="DOMImplementation"/>
<var name="nullString" type="DOMString" isNull="true"/>
<var name="nullDoctype" type="DocumentType" isNull="true"/>
<var name="doc" type="Document"/>
<var name="elem" type="Element"/>
<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="severity" type="int"/>
<var name="type" type="DOMString"/>
<var name="locator" type="DOMLocator"/>
<var name="relatedNode" type="Node"/>
<implementation var="domImpl"/>
<createDocument var="doc" obj="domImpl"
	namespaceURI="nullString" 
	qualifiedName="nullString"
	doctype="nullDoctype"/>
<assertDOMException id="xml10InvalidName">
	<INVALID_CHARACTER_ERR>
		<createElementNS var="elem" obj="doc" 
			namespaceURI='"http://www.example.org/domts/wellformed01"'
			qualifiedName='"LegalName&#2190;"'/>
	</INVALID_CHARACTER_ERR>
</assertDOMException>
<try>
	<xmlVersion obj="doc" value='"1.1"' interface="Document"/>
	<catch>
		<DOMException code="NOT_SUPPORTED_ERR">
			<return/>
		</DOMException>
	</catch>
</try> 
<createElementNS var="elem" obj="doc" 
	namespaceURI='"http://www.example.org/domts/wellformed01"'
	qualifiedName='"LegalName&#2190;"'/>
<appendChild var="retval" obj="doc" newChild="elem"/>
<xmlVersion obj="doc" value='"1.0"' interface="Document"/>
<domConfig var="domConfig" obj="doc" interface="Document"/>
<setParameter obj="domConfig" name='"infoset"' value="true"/>
<setParameter obj="domConfig" name='"error-handler"' value="errorMonitor"/>
<normalizeDocument obj="doc"/>
<allErrors var="errors" obj="errorMonitor"/>
<for-each member="error" collection="errors">
	<severity var="severity" obj="error"/>
	<assertEquals actual="severity" expected="2" ignoreCase="false" id="severity"/>
	<type var="type" obj="error" interface="DOMError"/>
	<assertEquals actual="type" expected='"wf-invalid-character-in-node-name"'
		ignoreCase="false" id="type"/>
	<location var="locator" obj="error" interface="DOMError"/>
	<relatedNode var="relatedNode" obj="locator" interface="DOMLocator"/>
	<assertSame actual="relatedNode" expected="elem" id="relatedNode"/>
</for-each>
<assertSize size="1" collection="errors" id="oneError"/>		
</test> 
 

