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 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 "dom2.dtd">
  19. <test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-2" name="documentimportnode09">
  20. <metadata>
  21. <title>documentimportnode09</title>
  22. <creator>IBM</creator>
  23. <description>
  24.         The importNode method imports a node from another document to this document.
  25.         The returned node has no parent; (parentNode is null). The source node is not
  26.         altered or removed from the original document but a new copy of the source node
  27.         is created.
  28.        
  29.         Using the method importNode with deep=false, import a newly created DocumentFragment node
  30.         with the first address element from this Document appended to it into this document.
  31.         Since deep=false, an empty DocumentFragment should be returned
  32. </description>
  33. <contributor>Neil Delima</contributor>
  34. <date qualifier="created">2002-04-30</date>
  35. <subject resource="http://www.w3.org/TR/DOM-Level-2-Core/core"/>
  36. <subject resource="http://www.w3.org/TR/DOM-Level-2-Core/core#Core-Document-importNode"/>
  37. </metadata>
  38. <implementationAttribute name="namespaceAware" value="true"/>
  39. <var name="doc" type="Document"/>
  40. <var name="docFragment" type="DocumentFragment"/>
  41. <var name="childList" type="NodeList"/>
  42. <var name="success" type="boolean"/>
  43. <var name="addressNode" type="Node"/>
  44. <var name="appendedChild" type="Node"/>
  45. <var name="importedDocFrag" type="Node"/>
  46. <load var="doc" href="staffNS" willBeModified="true"/>
  47. <createDocumentFragment var="docFragment" obj="doc"/>
  48. <getElementsByTagNameNS var="childList" obj="doc" localName='"address"' namespaceURI='"*"' interface="Document"/>
  49. <item var="addressNode" obj="childList" index="0"  interface="NodeList"/>
  50. <appendChild var="appendedChild" obj="docFragment" newChild="addressNode"/>
  51. <importNode var="importedDocFrag" obj="doc" importedNode="docFragment" deep="false"/>
  52. <hasChildNodes var="success" obj="importedDocFrag"/>
  53. <assertFalse actual="success" id="documentimportnode09"/>
  54. </test>