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. <!--
  6.  
  7.  
  8.  
  9. Copyright (c) 2001 World Wide Web Consortium,
  10.  
  11. (Massachusetts Institute of Technology, Institut National de
  12.  
  13. Recherche en Informatique et en Automatique, Keio University).  All
  14.  
  15. Rights Reserved.  This program is distributed under the W3C's Software
  16.  
  17. Intellectual Property License.  This program is distributed in the
  18.  
  19. hope that it will be useful, but WITHOUT ANY WARRANTY; without even
  20.  
  21. the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
  22.  
  23. PURPOSE.  
  24.  
  25.  
  26.  
  27. See W3C License http://www.w3.org/Consortium/Legal/ for more details.
  28.  
  29.  
  30.  
  31. -->
  32.  
  33. <!DOCTYPE test SYSTEM "dom2.dtd">
  34.  
  35. <test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-2" name="elementsetattributensurinull">
  36.  
  37. <metadata>
  38.  
  39. <title>elementSetAttributeNSURINull</title>
  40.  
  41. <creator>NIST</creator>
  42.  
  43. <description>
  44.  
  45.     The "setAttributeNS(namespaceURI,qualifiedName,value)" method raises a
  46.  
  47.    NAMESPACE_ERR DOMException if the specified
  48.  
  49.    qualifiedName has a prefix and the namespaceURI is null.
  50.  
  51.    
  52.  
  53.    Attempt to add a new attribute on the first employee node.
  54.  
  55.    An exception should be raised since the "qualifiedName" has a
  56.  
  57.    prefix and the namespaceURI is null.
  58.  
  59. </description>
  60.  
  61. <contributor>Mary Brady</contributor>
  62.  
  63. <date qualifier="created">2001-08-17</date>
  64.  
  65. <subject resource="http://www.w3.org/TR/DOM-Level-2-Core/core#ID-ElSetAttrNS"/>
  66.  
  67. <subject resource="http://www.w3.org/TR/DOM-Level-2-Core/core#xpointer(id('ID-ElSetAttrNS')/raises/exception[@name='DOMException']/descr/p[substring-before(.,':')='NAMESPACE_ERR'])"/>
  68.  
  69. </metadata>
  70.  
  71. <var name="namespaceURI" type="DOMString" isNull="true"/>
  72.  
  73. <var name="qualifiedName" type="DOMString" value='"emp:qualifiedName"'/>
  74.  
  75. <var name="doc" type="Document"/>
  76.  
  77. <var name="elementList" type="NodeList"/>
  78.  
  79. <var name="testAddr" type="Node"/>
  80.  
  81. <load var="doc" href="staff" willBeModified="true"/>
  82.  
  83. <getElementsByTagName interface="Document" obj="doc" var="elementList" tagname='"employee"'/>
  84.  
  85. <item interface="NodeList" obj="elementList" var="testAddr" index="0"/>
  86.  
  87. <assertDOMException id="throw_NAMESPACE_ERR">
  88.  
  89. <NAMESPACE_ERR>
  90.  
  91. <setAttributeNS obj="testAddr" namespaceURI="namespaceURI" qualifiedName="qualifiedName" value='"newValue"'/>
  92.  
  93. </NAMESPACE_ERR>
  94.  
  95. </assertDOMException>
  96.  
  97. </test>
  98.  
  99.