<?xml version="1.0" standalone="no"?>
<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?>
<!--

Copyright (c) 2003-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="DOMWriterTest4">
  <metadata>
    <title>DOMWriterTest4</title>
    <creator>Curt Arnold</creator>
    <description>Writes a document to an uninitialized LSOutput.</description>
	<date qualifier="created">2003-12-08</date>
	<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSSerializer-write"/>
  </metadata>
  <implementationAttribute name="validating" value="false"/>
  
  <var name="testDoc" type="Document"/>
  <var name="domImpl" type="DOMImplementationLS"/>
  <var name="output" type="LSOutput"/>
  <var name="serializer" type="LSSerializer"/>
  <var name="status" type="boolean"/>
  
  <load var="testDoc" href="test0" willBeModified="false"/>
  <implementation var="domImpl"/>
  
  <!--   create an LSOutput   -->
  <createLSOutput var="output" obj="domImpl"/>
  
  <!--   create a serializer and write a test document    -->
  <createLSSerializer var="serializer" obj="domImpl"/>
  <assertLSException id="throw_SERIALIZE_ERR">
  	<SERIALIZE_ERR>
  		<write var="status" obj="serializer" destination="output" nodeArg="testDoc"/>
  	</SERIALIZE_ERR>
  </assertLSException>
</test>





