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="canonicalform03">
  20. <metadata>
  21. <title>canonicalform03</title>
  22. <creator>Curt Arnold</creator>
  23. <description>
  24. Normalize a document with the 'canonical-form' parameter set to true and
  25. check that a CDATASection has been eliminated.
  26. </description>
  27. <date qualifier="created">2004-02-26</date>
  28. <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-normalizeDocument"/>
  29. <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-canonical-form"/>
  30. </metadata>
  31. <implementationAttribute name="namespaceAware" value="true"/>
  32. <implementationAttribute name="coalescing" value="false"/>
  33. <var name="doc" type="Document"/>
  34. <var name="elemList" type="NodeList"/>
  35. <var name="elemName" type="Element"/>
  36. <var name="cdata" type="CDATASection"/>
  37. <var name="text" type="Text"/>
  38. <var name="nodeName" type="DOMString"/>
  39. <var name="domConfig" type="DOMConfiguration"/>
  40. <var name="errorMonitor" type="DOMErrorMonitor"/>
  41. <var name="canSet" type="boolean"/>
  42. <load var="doc" href="hc_staff" willBeModified="true"/>
  43. <getElementsByTagName var="elemList" obj="doc" tagname='"strong"' interface="Document"/>
  44. <item var="elemName" obj="elemList" index="1" interface="NodeList"/>
  45. <lastChild var="cdata" obj="elemName" interface="Node"/>
  46. <nodeName var="nodeName" obj="cdata"/>
  47. <assertEquals actual="nodeName" expected='"#cdata-section"' id="documentnormalizedocument02" ignoreCase="false"/>
  48. <domConfig interface="Document" obj="doc" var="domConfig"/>
  49. <setParameter obj="domConfig" name='"error-handler"' value="errorMonitor"/>
  50. <canSetParameter var="canSet" obj="domConfig" name='"canonical-form"' value="true"/>
  51. <if><isTrue value="canSet"/>
  52. <setParameter obj="domConfig" name='"canonical-form"' value="true"/>
  53. <normalizeDocument obj="doc"/>
  54. <assertLowerSeverity obj="errorMonitor" severity="SEVERITY_ERROR" id="normalization2Error"/>
  55. <getElementsByTagName var="elemList" obj="doc" tagname='"strong"' interface="Document"/>
  56. <item var="elemName" obj="elemList" index="1" interface="NodeList"/>
  57. <lastChild var="text" obj="elemName" interface="Node"/>
  58. <nodeName var="nodeName" obj="text"/>
  59. <assertEquals actual="nodeName" expected='"#text"' id="documentnormalizedocument02_false" ignoreCase="false"/>
  60. </if>
  61. </test>
  62.  
  63.