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-2003 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="namednodemapinuseattributeerr">
  15. <metadata>
  16. <title>namedNodeMapInUseAttributeErr</title>
  17. <creator>NIST</creator>
  18. <description>
  19. The "setNamedItem(arg)" method raises a
  20. INUSE_ATTRIBUTE_ERR DOMException if "arg" is an
  21. Attr that is already in an attribute of another Element.
  22.  
  23. Create a NamedNodeMap object from the attributes of the
  24. last child of the third employee and attempt to add
  25. an attribute that is already being used by the first
  26. employee.  This should raise the desired exception.
  27. </description>
  28. <contributor>Mary Brady</contributor>
  29. <date qualifier="created">2001-08-17</date>
  30. <subject resource="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#xpointer(id('ID-258A00AF')/constant[@name='INUSE_ATTRIBUTE_ERR'])"/>
  31. <subject resource="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-1025163788"/>
  32. <subject resource="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#xpointer(id('ID-1025163788')/raises/exception[@name='DOMException']/descr/p[substring-before(.,':')='INUSE_ATTRIBUTE_ERR'])"/>
  33. <subject resource="http://www.w3.org/Bugs/Public/show_bug.cgi?id=249"/>
  34. </metadata>
  35. <var name="doc" type="Document"/>
  36. <var name="elementList" type="NodeList"/>
  37. <var name="firstNode" type="Element"/>
  38. <var name="testNode" type="Node"/>
  39. <var name="attributes" type="NamedNodeMap"/>
  40. <var name="domesticAttr" type="Attr"/>
  41. <var name="setAttr" type="Attr"/>
  42. <var name="setNode" type="Node"/>
  43. <load var="doc" href="staff" willBeModified="true"/>
  44. <getElementsByTagName interface="Document" obj="doc" var="elementList" tagname="&quot;address&quot;"/>
  45. <item interface="NodeList" obj="elementList" var="firstNode" index="0"/>
  46. <createAttribute obj="doc" var="domesticAttr" name="&quot;domestic&quot;"/>
  47. <value interface="Attr" obj="domesticAttr" value="&quot;Yes&quot;"/>
  48. <setAttributeNode var="setAttr" obj="firstNode" newAttr="domesticAttr"/>
  49. <getElementsByTagName interface="Document" obj="doc" var="elementList" tagname="&quot;address&quot;"/>
  50. <item interface="NodeList" obj="elementList" var="testNode" index="2"/>
  51. <attributes obj="testNode" var="attributes"/>
  52. <assertDOMException id="throw_INUSE_ATTRIBUTE_ERR">
  53. <INUSE_ATTRIBUTE_ERR>
  54. <setNamedItem var="setNode" interface="NamedNodeMap" obj="attributes" arg="domesticAttr"/>
  55. </INUSE_ATTRIBUTE_ERR>
  56. </assertDOMException>
  57. </test>
  58.