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 "dom2.dtd">
  19. <test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-2" name="documentimportnode22">
  20. <metadata>
  21. <title>documentimportnode21</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=true/false, import two notaiton nodes into the
  30.         same and different documnet objects.  In each case check if valid public and systemids
  31.         are returned if any and if none, check if a null value was 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="docTypeNull" type="DocumentType" isNull="true"/>
  41. <var name="docImp" type="Document"/>
  42. <var name="domImpl" type="DOMImplementation"/>
  43. <var name="docType" type="DocumentType"/>
  44. <var name="nodeMap" type="NamedNodeMap"/>
  45. <var name="notation1" type="Notation"/>
  46. <var name="notation2" type="Notation"/>
  47. <var name="notationImp1" type="Notation"/>
  48. <var name="notationImp2" type="Notation"/>
  49. <var name="notationImpNew1" type="Notation"/>
  50. <var name="notationImpNew2" type="Notation"/>
  51. <var name="publicId1" type="DOMString"/>
  52. <var name="publicId1Imp" type="DOMString"/>
  53. <var name="publicId1NewImp" type="DOMString"/>
  54. <var name="publicId2Imp" type="DOMString"/>
  55. <var name="publicId2NewImp" type="DOMString"/>
  56. <var name="systemId1Imp" type="DOMString"/>
  57. <var name="systemId1NewImp" type="DOMString"/>
  58. <var name="systemId2" type="DOMString"/>
  59. <var name="systemId2Imp" type="DOMString"/>
  60. <var name="systemId2NewImp" type="DOMString"/>
  61.  
  62. <load var="doc" href="staffNS" willBeModified="true"/>
  63. <implementation var="domImpl" obj="doc" />
  64. <doctype var="docType" obj="doc"/>
  65. <createDocument var="docImp" obj="domImpl" namespaceURI='"http://www.w3.org/DOM/Test"' qualifiedName='"a:b"' doctype="docTypeNull"/>
  66. <notations var="nodeMap" obj="docType"/>       
  67. <assertNotNull actual="nodeMap" id="notationsNotNull"/>
  68. <getNamedItem var="notation1" obj="nodeMap" name='"notation1"'/>               
  69. <getNamedItem var="notation2" obj="nodeMap" name='"notation2"'/>               
  70. <importNode  var="notationImp1" obj="doc" importedNode="notation1" deep="true"/>
  71. <importNode  var="notationImp2" obj="doc" importedNode="notation2" deep="false"/>
  72. <importNode  var="notationImpNew1" obj="docImp" importedNode="notation1" deep="false"/>
  73. <importNode  var="notationImpNew2" obj="docImp" importedNode="notation2" deep="true"/>
  74. <publicId var="publicId1" obj="notation1"  interface="Notation"/>
  75. <publicId var="publicId1Imp" obj="notation1" interface="Notation"/>
  76. <publicId var="publicId1NewImp" obj="notation1" interface="Notation"/>
  77. <systemId var="systemId1Imp" obj="notation1" interface="Notation"/>
  78. <systemId var="systemId1NewImp" obj="notation1" interface="Notation"/>
  79. <publicId var="publicId2Imp" obj="notation2" interface="Notation"/>
  80. <publicId var="publicId2NewImp" obj="notation2" interface="Notation"/>
  81. <systemId var="systemId2" obj="notation2" interface="Notation"/>
  82. <systemId var="systemId2Imp" obj="notation2" interface="Notation"/>
  83. <systemId var="systemId2NewImp" obj="notation2" interface="Notation"/>
  84. <assertEquals expected="publicId1" actual="publicId1Imp" id="documentimportnode22_N1PID"  ignoreCase="false"/>
  85. <assertEquals expected="publicId1" actual="publicId1NewImp" id="documentimportnode22_N1NPID"  ignoreCase="false"/>
  86. <assertNull actual="systemId1Imp" id="documentimportnode22_N1SID"/>
  87. <assertNull actual="systemId1NewImp" id="documentimportnode22_N1NSID" />
  88. <assertEquals expected="systemId2" actual="systemId2Imp" id="documentimportnode22_N2SID"  ignoreCase="false"/>
  89. <assertEquals expected="systemId2" actual="systemId2NewImp" id="documentimportnode22_N2NSID"  ignoreCase="false"/>
  90. <assertNull actual="publicId2Imp" id="documentimportnode22_N2PID"/>
  91. <assertNull actual="publicId2Imp" id="documentimportnode22_N2NPID"/>
  92. </test>