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="nodereplacechild23">
  20. <metadata>
  21. <title>nodereplacechild23</title>
  22. <creator>IBM</creator>
  23. <description>
  24.         Using replaceChild on a new EntityReference node attempt to replace an Element, Text,
  25.         Comment, ProcessingInstruction and CDATASection nodes with each other and in each case
  26.         verify if a NO_MODIFICATION_ALLOWED_ERR is thrown.
  27. </description>
  28. <contributor>Neil Delima</contributor>
  29. <date qualifier="created">2002-06-10</date>
  30. <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-785887307"/>
  31. </metadata>
  32. <var name="doc" type="Document"/>
  33. <var name="entRef" type="EntityReference"/>
  34. <var name="txt" type="Text"/>
  35. <var name="elem" type="Element"/>
  36. <var name="comment" type="Comment"/>
  37. <var name="pi" type="ProcessingInstruction"/>
  38. <var name="cdata" type="CDATASection"/>
  39. <var name="replaced" type="Node"/>
  40. <var name="appendedChild" type="Node"/>
  41. <load var="doc" href="hc_staff" willBeModified="true"/>
  42. <createElementNS var="elem" obj="doc" namespaceURI='"http://www.w3.org/1999/xhtml"' qualifiedName='"dom3:p"'/>
  43. <createEntityReference var="entRef" obj="doc" name='"delta"'/>
  44. <createTextNode var="txt" obj="doc" data='"Text"'/>
  45. <createComment var="comment" obj="doc" data='"Comment"'/>
  46. <createCDATASection var="cdata" obj="doc" data='"CDATASection"'/>
  47. <createProcessingInstruction var="pi" obj="doc" target='"target"' data='"data"'/>
  48. <appendChild obj="elem" var="appendedChild" newChild="entRef"/>
  49. <appendChild obj="elem" var="appendedChild" newChild="txt"/>
  50. <appendChild obj="elem" var="appendedChild" newChild="comment"/>
  51. <appendChild obj="elem" var="appendedChild" newChild="pi"/>
  52. <appendChild obj="elem" var="appendedChild" newChild="cdata"/>
  53. <assertDOMException id="throw_NO_MODIFICATION_ALLOWED_ERR_1">
  54. <NO_MODIFICATION_ALLOWED_ERR>
  55. <replaceChild obj="entRef" var="replaced" oldChild="elem" newChild="cdata"/>
  56. </NO_MODIFICATION_ALLOWED_ERR>
  57. </assertDOMException>
  58. <assertDOMException id="throw_NO_MODIFICATION_ALLOWED_ERR_2">
  59. <NO_MODIFICATION_ALLOWED_ERR>
  60. <replaceChild obj="entRef" var="replaced" oldChild="cdata" newChild="pi"/>
  61. </NO_MODIFICATION_ALLOWED_ERR>
  62. </assertDOMException>
  63. <assertDOMException id="throw_NO_MODIFICATION_ALLOWED_ERR_3">
  64. <NO_MODIFICATION_ALLOWED_ERR>
  65. <replaceChild obj="entRef" var="replaced" oldChild="pi" newChild="comment"/>
  66. </NO_MODIFICATION_ALLOWED_ERR>
  67. </assertDOMException>
  68. <assertDOMException id="throw_NO_MODIFICATION_ALLOWED_ERR_4">
  69. <NO_MODIFICATION_ALLOWED_ERR>
  70. <replaceChild obj="entRef" var="replaced" oldChild="comment" newChild="txt"/>
  71. </NO_MODIFICATION_ALLOWED_ERR>
  72. </assertDOMException>
  73. <assertDOMException id="throw_NO_MODIFICATION_ALLOWED_ERR_5">
  74. <NO_MODIFICATION_ALLOWED_ERR>
  75. <replaceChild obj="entRef" var="replaced" oldChild="txt" newChild="elem"/>
  76. </NO_MODIFICATION_ALLOWED_ERR>
  77. </assertDOMException>
  78. </test>
  79.