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.  
  5. Copyright (c) 2001 World Wide Web Consortium,
  6. (Massachusetts Institute of Technology, Institut National de
  7. Recherche en Informatique et en Automatique, Keio University).  All
  8. Rights Reserved.  This program is distributed under the W3C's Software
  9. Intellectual Property License.  This program is distributed in the
  10. hope that it will be useful, but WITHOUT ANY WARRANTY; without even
  11. the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
  12. PURPOSE.  
  13.  
  14. See W3C License http://www.w3.org/Consortium/Legal/ for more details.
  15.  
  16. -->
  17. <!DOCTYPE test SYSTEM "dom2.dtd">
  18. <test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-2" name="getElementsByTagNameNS02">
  19. <metadata>
  20. <title>getElementsByTagNameNS02</title>
  21. <creator>NIST</creator>
  22. <description>
  23.     The "getElementsByTagNameNS(namespaceURI,localName)" method for a
  24.    Document should return a new NodeList of all Elements with a given
  25.    localName and namespaceURI in the order they were encountered in a preorder
  26.    traversal of the document tree.
  27.    
  28.    Invoke method getElementsByTagNameNS(namespaceURI,localName) on this document
  29.    with namespaceURI being " " and localName is "employee".
  30.    Method should return a new NodeList containing five Elements.
  31.    Retrieve the FOURTH element whose name should be "emp:employee".
  32. </description>
  33. <contributor>Mary Brady</contributor>
  34. <date qualifier="created">2001-08-17</date>
  35. <subject resource="http://www.w3.org/TR/DOM-Level-2-Core/core#ID-getElBTNNS"/>
  36. </metadata>
  37. <!--  this test requires namespace awareness   -->
  38. <implementationAttribute name="namespaceAware" value="true"/>
  39. <var name="doc" type="Document"/>
  40. <var name="newList" type="NodeList"/>
  41. <var name="newElement" type="Element"/>
  42. <var name="prefix" type="DOMString"/>
  43. <var name="lname" type="DOMString"/>
  44. <load var="doc" href="staffNS" willBeModified="false"/>
  45. <getElementsByTagNameNS interface="Document" obj="doc" var="newList" namespaceURI='"*"' localName='"employee"'/>
  46. <assertSize collection="newList" size="5" id="employeeCount"/>
  47. <item interface="NodeList" obj="newList" var="newElement" index="3"/>
  48. <prefix obj="newElement" var="prefix"/>
  49. <assertEquals actual="prefix" expected='"emp"' id="prefix" ignoreCase="false"/>
  50. <localName obj="newElement" var="lname"/>
  51. <assertEquals actual="lname" expected='"employee"' id="lname" ignoreCase="false"/>
  52. </test>
  53.