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-2004 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.  
  18. <!DOCTYPE test SYSTEM "dom3.dtd">
  19. <test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="documentrenamenode10">
  20. <metadata>
  21. <title>documentrenamenode10</title>
  22. <creator>IBM</creator>
  23. <description>
  24.         The method renameNode renames an existing node and raises a  NAMESPACE_ERR
  25.         if the qualifiedName has a prefix and the namespaceURI is null but a
  26.         NOT_SUPPORTED_ERR should be raised since the the type of the specified node is
  27.         neither ELEMENT_NODE nor ATTRIBUTE_NODE.
  28.  
  29.         Invoke the renameNode method on a new document node to rename a node to nodes
  30.         with malformed qualifiedNames.
  31.         Check if a NOT_SUPPORTED_ERR gets thrown instead of a NAMESPACE_ERR.
  32. </description>
  33. <contributor>Neil Delima</contributor>
  34. <date qualifier="created">2002-06-10</date>
  35. <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-renameNode"/>
  36. </metadata>
  37. <implementationAttribute name="namespaceAware" value="true"/>
  38. <var name="doc" type="Document"/>
  39. <var name="textEntry" type="DOMString" value='"hello"'/>
  40. <var name="textNode" type="Text"/>
  41. <var name="renamedNode" type="Node"/>
  42. <var name="qualifiedName" type="DOMString"/>
  43. <var name="nullDocType" type="DocumentType" isNull="true"/>
  44. <var name="qualifiedNames" type="List">
  45. <member>&quot;_:&quot;</member>
  46. <member>&quot;:0&quot;</member>
  47. <member>&quot;:&quot;</member>
  48. <member>&quot;a0:0&quot;</member>
  49. <member>&quot;_:0;&quot;</member>
  50. <member>&quot;a:::::c&quot;</member>
  51. </var>
  52. <load var="doc" href="hc_staff" willBeModified="false"/>
  53. <createTextNode var="textNode" data="textEntry" obj="doc"/>
  54. <for-each collection="qualifiedNames" member="qualifiedName">
  55. <assertDOMException id="documentrenamenode10_NOT_SUPPORTED_ERR">
  56. <NOT_SUPPORTED_ERR>
  57. <renameNode var="renamedNode" obj="doc" n="textNode" namespaceURI='"http://www.w3.org/XML/1998/namespace"' qualifiedName="qualifiedName"/>
  58. </NOT_SUPPORTED_ERR>
  59. </assertDOMException>
  60. </for-each>
  61. </test>
  62.