Subversion Repositories Kolibri OS

Rev

Go to most recent revision | Blame | Last modification | View Log | Download | RSS feed

  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. <!DOCTYPE test SYSTEM "dom3.dtd">
  19. <test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="documentrenamenode09">
  20. <metadata>
  21. <title>documentrenamenode09</title>
  22. <creator>IBM</creator>
  23. <description>
  24.         The method renameNode renames an existing node. When the specified node was created
  25.         from a different document than this document, a WRONG_DOCUMENT_ERR exception is thrown.
  26.  
  27.         Invoke the renameNode method on a new Document node to rename a new attribute node
  28.         created in the original Document, but later adopted by this new document node.  The
  29.         ownerDocument attribute of this attribute has now changed, such that the attribute node is considered to
  30.        be created from this new document node. Verify that no exception is thrown upon renaming and verify
  31.        the new nodeName of this attribute node.
  32. </description>
  33. <contributor>Neil Delima</contributor>
  34. <date qualifier="created">2002-06-10</date>
  35. <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-renameNode"/>
  36. </metadata>
  37. <implementationAttribute name="namespaceAware" value="true"/>
  38. <var name="doc" type="Document"/>
  39. <var name="newDoc" type="Document"/>
  40. <var name="domImpl" type="DOMImplementation"/>
  41. <var name="attr" type="Attr"/>
  42. <var name="renamedNode" type="Node"/>
  43. <var name="adopted" type="Node"/>
  44. <var name="nullDocType" type="DocumentType" isNull="true"/>
  45. <var name="attrNodeName" type="DOMString"/>
  46. <load var="doc" href="hc_staff" willBeModified="false"/>
  47. <implementation var="domImpl" obj="doc"/>
  48. <createDocument var="newDoc" obj="domImpl" namespaceURI='"http://www.w3.org/DOM/Test"' qualifiedName='"dom:newD"' doctype="nullDocType"/>
  49. <createAttributeNS var="attr" obj="doc" namespaceURI='"http://www.w3.org/DOM/Test"' qualifiedName='"test"'/>
  50. <adoptNode obj="newDoc" var="adopted" source="attr"/>
  51. <renameNode var="renamedNode" obj="newDoc" n="attr" namespaceURI='"http://www.w3.org/2000/xmlns/"' qualifiedName='"xmlns:xmlns"'/>
  52. <nodeName var="attrNodeName" obj="renamedNode"/>
  53. <assertEquals actual="attrNodeName" expected='"xmlns:xmlns"' id="documentrenamenode09_1" ignoreCase="false"/>
  54. </test>
  55.