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="documentimportnode05">
  20. <metadata>
  21. <title>documentimportnode05</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 attribute node,
  30.         into the another document.
  31.         Check the nodeName, nodeType and nodeValue namespaceURI of the imported node to
  32.         verify if it has been imported correctly.
  33. </description>
  34. <contributor>Neil Delima</contributor>
  35. <date qualifier="created">2002-04-30</date>
  36. <subject resource="http://www.w3.org/TR/DOM-Level-2-Core/core"/>
  37. <subject resource="http://www.w3.org/TR/DOM-Level-2-Core/core#Core-Document-importNode"/>
  38. </metadata>
  39. <implementationAttribute name="namespaceAware" value="true"/>
  40. <var name="doc" type="Document"/>
  41. <var name="docImported" type="Document"/>
  42. <var name="attr" type="Attr"/>
  43. <var name="importedAttr" type="Node"/>
  44. <var name="nodeName" type="DOMString"/>
  45. <var name="nodeType" type="int"/>
  46. <var name="nodeValue" type="DOMString"/>
  47. <var name="namespaceURI" type="DOMString"/>
  48. <load var="doc" href="staffNS" willBeModified="true"/>
  49. <load var="docImported" href="staff" willBeModified="true"/>
  50. <createAttributeNS var="attr" obj="doc" namespaceURI='"http://www.w3.org/DOM/Test"' qualifiedName='"a_:b0"' />
  51. <importNode var="importedAttr" obj="docImported" importedNode="attr" deep="false"/>
  52. <nodeName var="nodeName" obj="importedAttr"/>
  53. <nodeValue var="nodeValue" obj="importedAttr"/>
  54. <nodeType var="nodeType" obj="importedAttr"/>
  55. <namespaceURI var="namespaceURI" obj="importedAttr"/>
  56. <assertEquals expected='"a_:b0"' actual="nodeName"  id="documentimportnode05_nodeName"  ignoreCase="false"/>
  57. <assertEquals expected="2" actual="nodeType"  id="documentimportnode05_nodeType"  ignoreCase="false"/>
  58. <assertEquals expected='""' actual="nodeValue"  id="documentimportnode05_nodeValue"  ignoreCase="false"/>
  59. <assertEquals expected='"http://www.w3.org/DOM/Test"' actual="namespaceURI"  id="documentimportnode05_namespaceURI"  ignoreCase="false"/>
  60. </test>
  61.  
  62.  
  63.