Subversion Repositories Kolibri OS

Rev

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="nodegetnamespaceuri03">
  19. <metadata>
  20. <title>nodegetnamespaceuri03</title>
  21. <creator>IBM</creator>
  22. <description>
  23.         The method getNamespaceURI returns the namespace URI of this node, or null if it is unspecified
  24.         For nodes of any type other than ELEMENT_NODE and ATTRIBUTE_NODE and nodes created with
  25.         a DOM Level 1 method, such as createElement from the Document interface, this is always null.
  26.  
  27.         Ceate two new element nodes and atribute nodes, with and without namespace prefixes.
  28.         Retreive their namespaceURI's using getNamespaceURI and verrify if it is correct.
  29. </description>
  30. <contributor>Neil Delima</contributor>
  31. <date qualifier="created">2002-04-28</date>
  32. <subject resource="http://www.w3.org/TR/DOM-Level-2-Core/core#ID-NodeNSname"/>
  33. <subject resource="http://www.w3.org/Bugs/Public/show_bug.cgi?id=259"/>
  34. </metadata>
  35. <implementationAttribute name="namespaceAware" value="true"/>
  36. <var name="doc" type="Document"/>
  37. <var name="element" type="Element"/>
  38. <var name="elementNS" type="Element"/>
  39. <var name="attr" type="Attr"/>
  40. <var name="attrNS" type="Attr"/>
  41. <var name="elemNSURI" type="DOMString"/>
  42. <var name="elemNSURINull" type="DOMString"/>
  43. <var name="attrNSURI" type="DOMString"/>
  44. <var name="attrNSURINull" type="DOMString"/>
  45. <var name="nullNS" type="DOMString" isNull="true"/>
  46. <load var="doc" href="staff" willBeModified="false"/>
  47. <createElementNS var="element" obj="doc" namespaceURI="nullNS" qualifiedName='"elem"'/>
  48. <createElementNS var="elementNS" obj="doc" namespaceURI='"http://www.w3.org/DOM/Test/elem"' qualifiedName='"qual:qelem"'/>
  49. <createAttributeNS var="attr" obj="doc" namespaceURI="nullNS" qualifiedName='"attr"'/>
  50. <createAttributeNS var="attrNS" obj="doc" namespaceURI='"http://www.w3.org/DOM/Test/attr"' qualifiedName='"qual:qattr"'/>
  51. <namespaceURI var="elemNSURI" obj="elementNS"/>
  52. <namespaceURI var="elemNSURINull" obj="element"/>
  53. <namespaceURI var="attrNSURI" obj="attrNS"/>
  54. <namespaceURI var="attrNSURINull" obj="attr"/>
  55. <assertEquals actual="elemNSURI" expected='"http://www.w3.org/DOM/Test/elem"' id="nodegetnamespaceuri03_elemNSURI" ignoreCase="false"/>
  56. <assertNull actual="elemNSURINull" id="nodegetnamespaceuri03_1"/>
  57. <assertEquals actual="attrNSURI" expected='"http://www.w3.org/DOM/Test/attr"' id="nodegetnamespaceuri03_attrNSURI" ignoreCase="false"/>
  58. <assertNull actual="attrNSURINull" id="nodegetnamespaceuri03_2"/>
  59. </test>
  60.