trunk/resources/tests/dom3/Core/documentrenamenode12.xml
author Jan Vrany <jan.vrany@fit.cvut.cz>
Tue, 08 Apr 2008 19:47:42 +0000
changeset 0 5057afe1ec87
permissions -rw-r--r--
Initial import from CVS
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     1
<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?>
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     2
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     3
<!--
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     4
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     5
Copyright (c) 2001-2004 World Wide Web Consortium, 
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     6
(Massachusetts Institute of Technology, Institut National de
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     7
Recherche en Informatique et en Automatique, Keio University).  All 
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     8
Rights Reserved.  This program is distributed under the W3C's Software
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     9
Intellectual Property License.  This program is distributed in the 
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    10
hope that it will be useful, but WITHOUT ANY WARRANTY; without even
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    11
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    12
PURPOSE.  
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    13
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    14
See W3C License http://www.w3.org/Consortium/Legal/ for more details.
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    15
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    16
-->
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    17
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    18
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    19
<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="documentrenamenode12">
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    20
<metadata>
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    21
<title>documentrenamenode12</title>
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    22
<creator>IBM</creator>
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    23
<description>
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    24
	The method renameNode renames an existing node and raises a  NAMESPACE_ERR
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    25
	if the qualifiedName has a prefix and the namespaceURI is null but a 
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    26
	NOT_SUPPORTED_ERR should be raised since the the type of the specified node is 
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    27
	neither ELEMENT_NODE nor ATTRIBUTE_NODE.
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    28
 
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    29
	Invoke the renameNode method on this document node to rename a text node such that its
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    30
	qualifiedName has a prefix that is "xml" and namespaceURI is "http://www.w3.org/XML/1999/namespace".
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    31
	Check if a NOT_SUPPORTED_ERR gets thrown instead of a NAMESPACE_ERR since the type of node is not valid
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    32
        for this method.
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    33
</description>
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    34
<contributor>Neil Delima</contributor>
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    35
<date qualifier="created">2002-06-10</date>
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    36
<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-renameNode"/>
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    37
</metadata>
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    38
<implementationAttribute name="namespaceAware" value="true"/>
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    39
<var name="doc" type="Document"/>
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    40
<var name="renamedNode" type="Node"/>
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    41
<var name="textEntry" type="DOMString" value='"hello"'/>
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    42
<var name="textNode" type="Text"/>
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    43
<load var="doc" href="hc_staff" willBeModified="false"/>
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    44
<createTextNode var="textNode" data="textEntry" obj="doc"/>
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    45
<assertDOMException id="documentrenamenode12_NOT_SUPPORTED_ERR">
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    46
<NOT_SUPPORTED_ERR>
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    47
<renameNode var="renamedNode" obj="doc" n="textNode" namespaceURI='"http://www.w3.org/XML/1999/namespace"' qualifiedName='"xml:prefix"'/>
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    48
</NOT_SUPPORTED_ERR>
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    49
</assertDOMException>
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    50
</test>