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. Copyright (c) 2001-2004 World Wide Web Consortium,
  5. (Massachusetts Institute of Technology, Institut National de
  6. Recherche en Informatique et en Automatique, Keio University).  All
  7. Rights Reserved.  This program is distributed under the W3C's Software
  8. Intellectual Property License.  This program is distributed in the
  9. hope that it will be useful, but WITHOUT ANY WARRANTY; without even
  10. the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
  11. PURPOSE.  
  12.  
  13. See W3C License http://www.w3.org/Consortium/Legal/ for more details.
  14.  
  15. -->
  16.  
  17. <!DOCTYPE test SYSTEM "dom3.dtd">
  18. <test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="documentadoptnode28">
  19. <metadata>
  20. <title>documentadoptnode28</title>
  21. <creator>IBM</creator>
  22. <description>
  23.         Invoke the adoptNode method on this document using the "p" element with the default
  24.         Attribute "dir" as the source.  Verify if the node has been adopted correctly by
  25.         checking the nodeName of the adopted Element and by checking if the attribute was adopted.
  26.         Note the default attribute should be adopted in this case.
  27. </description>
  28. <contributor>Neil Delima</contributor>
  29. <date qualifier="created">2002-06-10</date>
  30. <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-adoptNode"/>
  31. </metadata>
  32. <var name="doc" type="Document"/>
  33. <var name="childList" type="NodeList"/>
  34. <var name="adoptedNode" type="Node"/>
  35. <var name="employeeElem" type="Node"/>
  36. <var name="attrImp" type="Attr"/>
  37. <var name="nodeName" type="DOMString"/>
  38. <var name="nullNSURI" type="DOMString" isNull="true"/>
  39. <load var="doc" href="hc_staff" willBeModified="true"/>
  40. <getElementsByTagName var="childList" obj="doc" tagname='"p"' interface="Document"/>
  41. <item var="employeeElem" obj="childList" index="3" interface="NodeList"/>
  42. <adoptNode var="adoptedNode" obj="doc" source="employeeElem"/>
  43. <if><notNull obj="adoptedNode"/>
  44. <getAttributeNode var="attrImp" obj="adoptedNode" name='"dir"'/>
  45. <nodeName var="nodeName" obj="attrImp"/>
  46. <assertEquals actual="nodeName" expected='"dir"' id="documentadoptnode28" ignoreCase="false"/>
  47. </if>
  48. </test>
  49.