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-2003 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="documentimportnode14">
  20. <metadata>
  21. <title>documentimportnode14</title>
  22. <creator>IBM</creator>
  23. <description>
  24.         Using the method importNode with deep=true, import the fourth employee element node of this
  25.         Document.  Verify if the node has been imported correctly by checking
  26.         if the default attribute present on this node has not been imported
  27.         and an explicit attribute has been imported.  
  28. </description>
  29. <contributor>Neil Delima</contributor>
  30. <date qualifier="created">2002-04-30</date>
  31. <subject resource="http://www.w3.org/TR/DOM-Level-2-Core/core"/>
  32. <subject resource="http://www.w3.org/TR/DOM-Level-2-Core/core#Core-Document-importNode"/>
  33. <subject resource="http://www.w3.org/Bugs/Public/show_bug.cgi?id=259"/>
  34. <subject resource="http://www.w3.org/Bugs/Public/show_bug.cgi?id=402"/>
  35. </metadata>
  36. <implementationAttribute name="namespaceAware" value="true"/>
  37. <var name="doc" type="Document"/>
  38. <var name="newDoc" type="Document"/>
  39. <var name="domImpl" type="DOMImplementation"/>
  40. <var name="nullDocType" type="DocumentType" isNull="true"/>
  41. <var name="childList" type="NodeList"/>
  42. <var name="imported" type="Node"/>
  43. <var name="employeeElem" type="Node"/>
  44. <var name="attrNode" type="Attr"/>
  45. <var name="attrValue" type="DOMString"/>
  46. <var name="nullNS" type="DOMString" isNull="true"/>
  47. <!--  willBeModified set to true just to be safe  -->
  48. <load var="doc" href="staffNS" willBeModified="true"/>
  49. <getElementsByTagNameNS var="childList" obj="doc" namespaceURI='"*"' localName='"employee"' interface="Document"/>
  50. <item var="employeeElem" obj="childList" index="3" interface="NodeList"/>
  51. <implementation var="domImpl"/>
  52. <createDocument var="newDoc" obj="domImpl" namespaceURI="nullNS" qualifiedName='"staff"' doctype="nullDocType"/>
  53. <importNode var="imported" obj="newDoc" importedNode="employeeElem" deep="true"/>
  54. <getAttributeNodeNS var="attrNode" obj="imported" namespaceURI="nullNS" localName='"defaultAttr"'/>
  55. <!--  default attribute should not be copied  -->
  56. <assertNull actual="attrNode" id="defaultAttrNotImported"/>
  57. <!--  explicit attributes should be copied  -->
  58. <getAttributeNS var="attrValue" obj="imported" namespaceURI='"http://www.w3.org/2000/xmlns/"' localName='"emp"'/>
  59. <assertEquals actual="attrValue" expected='"http://www.nist.gov"'
  60.     ignoreCase="false" id="explicitAttrImported"/>
  61. </test>
  62.