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 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="attrcreatetextnode2">
  15. <metadata>
  16. <title>attrCreateTextNode2</title>
  17. <creator>Curt Arnold</creator>
  18. <description>
  19.    The "setNodeValue()" method for an attribute creates a
  20.  Text node with the unparsed content of the string.
  21.  Retrieve the attribute named "street" from the last
  22.  child of of the fourth employee and assign the "Y&amp;ent1;"
  23.  string to its value attribute.  This value is not yet
  24.  parsed and therefore should still be the same upon
  25.  retrieval. This test uses the "getNamedItem(name)" method
  26.  from the NamedNodeMap interface.
  27. </description>
  28. <date qualifier="created">2001-10-22</date>
  29. <!--  Node.nodeValue  -->
  30. <subject resource="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-F68D080"/>
  31. <!--  bug report on initial version  -->
  32. <subject resource="http://lists.w3.org/Archives/Public/www-dom-ts/2002Apr/0057.html"/>
  33. </metadata>
  34. <var name="doc" type="Document"/>
  35. <var name="addressList" type="NodeList"/>
  36. <var name="testNode" type="Node"/>
  37. <var name="attributes" type="NamedNodeMap"/>
  38. <var name="streetAttr" type="Attr"/>
  39. <var name="value" type="DOMString"/>
  40. <load var="doc" href="staff" willBeModified="true"/>
  41. <getElementsByTagName interface="Document" obj="doc" var="addressList" tagname="&quot;address&quot;"/>
  42. <item interface="NodeList" obj="addressList" var="testNode" index="3"/>
  43. <attributes obj="testNode" var="attributes"/>
  44. <getNamedItem obj="attributes" var="streetAttr" name="&quot;street&quot;"/>
  45. <nodeValue obj="streetAttr" value='"Y&amp;ent1;"'/>
  46. <value interface="Attr" obj="streetAttr" var="value"/>
  47. <assertEquals actual="value" expected='"Y&amp;ent1;"' id="value" ignoreCase="false"/>
  48. <nodeValue obj="streetAttr" var="value"/>
  49. <assertEquals actual="value" expected='"Y&amp;ent1;"' id="nodeValue" ignoreCase="false"/>
  50. </test>
  51.