0
|
1 |
<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?>
|
|
2 |
|
|
3 |
<!--
|
|
4 |
|
|
5 |
Copyright (c) 2001-2004 World Wide Web Consortium,
|
|
6 |
(Massachusetts Institute of Technology, Institut National de
|
|
7 |
Recherche en Informatique et en Automatique, Keio University). All
|
|
8 |
Rights Reserved. This program is distributed under the W3C's Software
|
|
9 |
Intellectual Property License. This program is distributed in the
|
|
10 |
hope that it will be useful, but WITHOUT ANY WARRANTY; without even
|
|
11 |
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
|
12 |
PURPOSE.
|
|
13 |
|
|
14 |
See W3C License http://www.w3.org/Consortium/Legal/ for more details.
|
|
15 |
|
|
16 |
-->
|
|
17 |
|
|
18 |
|
|
19 |
<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="documentrenamenode27">
|
|
20 |
<metadata>
|
|
21 |
<title>documentrenamenode27</title>
|
|
22 |
<creator>IBM</creator>
|
|
23 |
<description>
|
|
24 |
Invoke the renameNode method to attempt to rename new Text, Comment, CDataSection,
|
|
25 |
ProcessingInstruction and EntityReference nodes of a new Document.
|
|
26 |
Check if a NOT_SUPPORTED_ERR is thrown.
|
|
27 |
</description>
|
|
28 |
<contributor>Neil Delima</contributor>
|
|
29 |
<date qualifier="created">2002-06-10</date>
|
|
30 |
<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-renameNode"/>
|
|
31 |
</metadata>
|
|
32 |
<var name="doc" type="Document"/>
|
|
33 |
<var name="newDoc" type="Document"/>
|
|
34 |
<var name="domImpl" type="DOMImplementation"/>
|
|
35 |
<var name="text" type="Text"/>
|
|
36 |
<var name="comment" type="Comment"/>
|
|
37 |
<var name="cdata" type="CDATASection"/>
|
|
38 |
<var name="pi" type="ProcessingInstruction"/>
|
|
39 |
<var name="entref" type="EntityReference"/>
|
|
40 |
<var name="renamedTxt" type="Node"/>
|
|
41 |
<var name="renamedComment" type="Node"/>
|
|
42 |
<var name="renamedCdata" type="Node"/>
|
|
43 |
<var name="renamedPi" type="Node"/>
|
|
44 |
<var name="renamedEntRef" type="Node"/>
|
|
45 |
<var name="nullDocType" type="DocumentType" isNull="true"/>
|
|
46 |
<var name="docElem" type="Element"/>
|
|
47 |
<var name="rootNS" type="DOMString"/>
|
|
48 |
<var name="rootName" type="DOMString"/>
|
|
49 |
<load var="doc" href="hc_staff" willBeModified="true"/>
|
|
50 |
<documentElement var="docElem" obj="doc"/>
|
|
51 |
<namespaceURI var="rootNS" obj="docElem" interface="Node"/>
|
|
52 |
<tagName var="rootName" obj="docElem"/>
|
|
53 |
<implementation var="domImpl" obj="doc"/>
|
|
54 |
<createDocument var="newDoc" obj="domImpl" namespaceURI="rootNS" qualifiedName="rootName" doctype="nullDocType"/>
|
|
55 |
<createTextNode var="text" obj="newDoc" data='"text"'/>
|
|
56 |
<createComment var="comment" obj="newDoc" data='"comment"'/>
|
|
57 |
<createCDATASection var="cdata" obj="newDoc" data='"cdata"'/>
|
|
58 |
<createProcessingInstruction var="pi" obj="newDoc" target='"pit"' data='"pid"'/>
|
|
59 |
<createEntityReference var="entref" obj="newDoc" name='"alpha"'/>
|
|
60 |
<assertDOMException id="throw_NOT_SUPPORTED_ERR_1">
|
|
61 |
<NOT_SUPPORTED_ERR>
|
|
62 |
<renameNode var="renamedTxt" obj="newDoc" n="text" namespaceURI='"http://www.w3.org/DOM/Test"' qualifiedName='"text"'/>
|
|
63 |
</NOT_SUPPORTED_ERR>
|
|
64 |
</assertDOMException>
|
|
65 |
<assertDOMException id="throw_NOT_SUPPORTED_ERR_2">
|
|
66 |
<NOT_SUPPORTED_ERR>
|
|
67 |
<renameNode var="renamedComment" obj="newDoc" n="comment" namespaceURI='"http://www.w3.org/DOM/Test"' qualifiedName='"comment"'/>
|
|
68 |
</NOT_SUPPORTED_ERR>
|
|
69 |
</assertDOMException>
|
|
70 |
<assertDOMException id="throw_NOT_SUPPORTED_ERR_3">
|
|
71 |
<NOT_SUPPORTED_ERR>
|
|
72 |
<renameNode var="renamedCdata" obj="newDoc" n="cdata" namespaceURI='"http://www.w3.org/DOM/Test"' qualifiedName='"cdata"'/>
|
|
73 |
</NOT_SUPPORTED_ERR>
|
|
74 |
</assertDOMException>
|
|
75 |
<assertDOMException id="throw_NOT_SUPPORTED_ERR_4">
|
|
76 |
<NOT_SUPPORTED_ERR>
|
|
77 |
<renameNode var="renamedPi" obj="newDoc" n="pi" namespaceURI='"http://www.w3.org/DOM/Test"' qualifiedName='"pi"'/>
|
|
78 |
</NOT_SUPPORTED_ERR>
|
|
79 |
</assertDOMException>
|
|
80 |
<assertDOMException id="throw_NOT_SUPPORTED_ERR_5">
|
|
81 |
<NOT_SUPPORTED_ERR>
|
|
82 |
<renameNode var="renamedEntRef" obj="newDoc" n="entref" namespaceURI='"http://www.w3.org/DOM/Test"' qualifiedName='"entref"'/>
|
|
83 |
</NOT_SUPPORTED_ERR>
|
|
84 |
</assertDOMException>
|
|
85 |
</test>
|
|
86 |
|