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-2003 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="elementgetelementsbytagnamens04">
  19.   <metadata>
  20.     <title>elementgetelementsbytagnamens04</title>
  21.     <creator>IBM</creator>
  22.     <description>
  23.       Returns a NodeList of all the Elements with a given local name and namespace URI in the
  24.       order in which they are encountered in a preorder traversal of the Document tree.
  25.       Create a new element node ('root') and append three newly created child nodes (all have
  26.       local name 'child' and defined in different namespaces).
  27.       Test 1: invoke getElementsByTagNameNS to retrieve one of the children.
  28.       Test 2: invoke getElementsByTagNameNS with the value of namespace equals to '*', and
  29.       verify that the node list has length of 3.
  30.     </description>
  31.     <contributor>Neil Delima</contributor>
  32.     <date qualifier="created">2002-04-28</date>
  33.     <subject resource="http://www.w3.org/TR/DOM-Level-2-Core/core#ID-getElBTNNS"/>
  34.     <subject resource="http://www.w3.org/Bugs/Public/show_bug.cgi?id=259"/>
  35.   </metadata>
  36.   <implementationAttribute name="namespaceAware" value="true"/>
  37.   <var name="doc" type="Document"/>
  38.   <var name="element" type="Element"/>
  39.   <var name="child1" type="Element"/>
  40.   <var name="child2" type="Element"/>
  41.   <var name="child3" type="Element"/>
  42.   <var name="appendedChild" type="Node"/>
  43.   <var name="elementList" type="NodeList"/>
  44.   <var name="nullNS" type="DOMString" isNull="true"/>
  45.   <load var="doc" href="staffNS" willBeModified="false"/>
  46.   <createElementNS var="element" obj="doc" namespaceURI='"http://www.w3.org/DOM"'
  47.                    qualifiedName='"root"'/>
  48.   <createElementNS var="child1" obj="doc" namespaceURI='"http://www.w3.org/DOM/Level1"'
  49.                    qualifiedName='"dom:child"'/>
  50.   <createElementNS var="child2" obj="doc" namespaceURI="nullNS"
  51.                    qualifiedName='"child"'/>
  52.   <createElementNS var="child3" obj="doc" namespaceURI='"http://www.w3.org/DOM/Level2"'
  53.                    qualifiedName='"dom:child"'/>
  54.   <appendChild var="appendedChild" obj="element" newChild="child1"/>
  55.   <appendChild var="appendedChild" obj="element" newChild="child2"/>
  56.   <appendChild var="appendedChild" obj="element" newChild="child3"/>
  57.   <getElementsByTagNameNS var="elementList" obj="element" namespaceURI="nullNS"
  58.                           localName='"child"'  interface="Element" />
  59.   <assertSize size="1" collection="elementList" id="elementgetelementsbytagnamens04_1"/>
  60.   <getElementsByTagNameNS var="elementList" obj="element" namespaceURI='"*"'
  61.                           localName='"child"'  interface="Element" />
  62.   <assertSize size="3" collection="elementList" id="elementgetelementsbytagnamens04_2"/>
  63. </test>
  64.