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="documentcreateentityreferenceknown">
  15. <metadata>
  16. <title>documentCreateEntityReferenceKnown</title>
  17. <creator>NIST</creator>
  18. <description>
  19.     The "createEntityReference(name)" method creates an
  20.    EntityReference node.  In addition, if the referenced entity
  21.    is known, the child list of the "EntityReference" node
  22.    is the same as the corresponding "Entity" node.
  23.    
  24.    Retrieve the entire DOM document and invoke its
  25.    "createEntityReference(name)" method.  It should create
  26.    a new EntityReference node for the Entity with the
  27.    given name.  The referenced entity is known, therefore the child
  28.    list of the "EntityReference" node is the same as the corresponding
  29.    "Entity" node.
  30. </description>
  31. <contributor>Mary Brady</contributor>
  32. <date qualifier="created">2001-08-17</date>
  33. <subject resource="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-392B75AE"/>
  34. </metadata>
  35. <var name="doc" type="Document"/>
  36. <var name="newEntRefNode" type="EntityReference"/>
  37. <var name="newEntRefList" type="NodeList"/>
  38. <var name="child" type="Node"/>
  39. <var name="name" type="DOMString"/>
  40. <var name="value" type="DOMString"/>
  41. <load var="doc" href="staff" willBeModified="true"/>
  42. <createEntityReference obj="doc" var="newEntRefNode" name="&quot;ent3&quot;"/>
  43. <assertNotNull actual="newEntRefNode" id="createdEntRefNotNull"/>
  44. <childNodes obj="newEntRefNode" var="newEntRefList"/>
  45. <assertSize collection="newEntRefList" size="1" id="size"/>
  46. <firstChild interface="Node" obj="newEntRefNode" var="child"/>
  47. <nodeName obj="child" var="name"/>
  48. <assertEquals actual="name" expected="&quot;#text&quot;" ignoreCase="false" id="name"/>
  49. <nodeValue obj="child" var="value"/>
  50. <assertEquals actual="value" expected="&quot;Texas&quot;" ignoreCase="false" id="value"/>
  51. </test>
  52.