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"?>
  2. <!--
  3. Copyright (c) 2001-2004 World Wide Web Consortium,
  4. (Massachusetts Institute of Technology, Institut National de
  5. Recherche en Informatique et en Automatique, Keio University). All
  6. Rights Reserved. This program is distributed under the W3C's Software
  7. Intellectual Property License. This program is distributed in the
  8. hope that it will be useful, but WITHOUT ANY WARRANTY; without even
  9. the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
  10. PURPOSE.
  11. See W3C License http://www.w3.org/Consortium/Legal/ for more details.
  12. --><!DOCTYPE test SYSTEM "dom1.dtd">
  13.  
  14. <test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-1" name="hc_namednodemapsetnameditem">
  15. <metadata>
  16. <title>hc_namednodemapsetnameditem</title>
  17. <creator>Curt Arnold</creator>
  18. <description>
  19.   Retrieve the second "p" element and create a NamedNodeMap
  20.   object from the attributes of the last child by
  21.   invoking the "getAttributes()" method.  Once the
  22.   list is created an invocation of the "setNamedItem(arg)"
  23.   method is done with arg=newAttr, where newAttr is a
  24.   new Attr Node previously created.  The "setNamedItem(arg)"
  25.   method should add then new node to the NamedNodeItem
  26.   object by using its "nodeName" attribute("lang').
  27.    This node is then retrieved using the "getNamedItem(name)"
  28.    method.
  29. </description>
  30.  
  31. <date qualifier="created">2002-06-09</date>
  32. <subject resource="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-1025163788"/>
  33. <subject resource="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-349467F9"/>
  34. <subject resource="http://www.w3.org/Bugs/Public/show_bug.cgi?id=236"/>
  35. <subject resource="http://lists.w3.org/Archives/Public/www-dom-ts/2003Jun/0011.html"/>
  36. <subject resource="http://www.w3.org/Bugs/Public/show_bug.cgi?id=243"/>
  37. </metadata>
  38. <var name="doc" type="Document"/>
  39. <var name="elementList" type="NodeList"/>
  40. <var name="newAttribute" type="Attr"/>
  41. <var name="testAddress" type="Node"/>
  42. <var name="attributes" type="NamedNodeMap"/>
  43. <var name="districtNode" type="Attr"/>
  44. <var name="attrName" type="DOMString"/>
  45. <var name="setNode" type="Node"/>
  46. <load var="doc" href="hc_staff" willBeModified="true"/>
  47. <getElementsByTagName interface="Document" obj="doc" var="elementList" tagname='"acronym"'/>
  48. <item interface="NodeList" obj="elementList" var="testAddress" index="1"/>
  49. <createAttribute obj="doc" var="newAttribute" name='"lang"'/>
  50. <attributes obj="testAddress" var="attributes"/>
  51. <setNamedItem var="setNode" obj="attributes" arg="newAttribute"/>
  52. <getNamedItem obj="attributes" var="districtNode" name='"lang"'/>
  53. <nodeName obj="districtNode" var="attrName"/>
  54. <assertEquals actual="attrName" expected='"lang"' id="nodeName"
  55.          ignoreCase="auto" context="attribute"/>
  56. </test>
  57.