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="documentnormalizedocument11">
  20. <metadata>
  21. <title>documentnormalizedocument11</title>
  22. <creator>IBM</creator>
  23. <description>
  24.         The normalizeDocument method method acts as if the document was going through a save
  25.         and load cycle, putting the document in a "normal" form.
  26.         The feature namespace-declarations when set to false, discards all namespace declaration attributes,
  27.        although namespace prefixes are still retained.
  28.        
  29.         Set the normalization feature "namespace-declarations" to false, invoke normalizeDocument and verify
  30.        the nodeName of element acquired by tagname.  
  31. </description>
  32. <contributor>Neil Delima</contributor>
  33. <date qualifier="created">2002-06-10</date>
  34. <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-normalizeDocument"/>
  35. <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-namespace-declarations"/>
  36. </metadata>
  37. <implementationAttribute name="namespaceAware" value="true"/>
  38. <implementationAttribute name="ignoringElementContentWhitespace" value="true"/>
  39. <var name="doc" type="Document"/>
  40. <var name="elemList" type="NodeList"/>
  41. <var name="elemName" type="Element"/>
  42. <var name="nodeName" type="DOMString"/>
  43. <var name="canSet" type="boolean"/>
  44. <var name="domConfig" type="DOMConfiguration"/>
  45. <load var="doc" href="hc_staff" willBeModified="false"/>
  46. <domConfig obj="doc" var="domConfig" interface="Document"/>
  47. <setParameter obj="domConfig" name='"namespace-declarations"' value="true"/>
  48. <normalizeDocument obj="doc"/>
  49. <getElementsByTagNameNS var="elemList" obj="doc" namespaceURI='"*"' localName='"acronym"' interface="Document"/>
  50. <item var="elemName" obj="elemList" index="1" interface="NodeList"/>
  51. <assertNotNull actual="elemName" id="documentnormalizedocument11_NotNullElem"/>
  52. <canSetParameter var="canSet" obj="domConfig" name='"namespace-declarations"' value="false"/>
  53.  
  54. <if>
  55. <isTrue value="canSet"/>
  56. <setParameter obj="domConfig" name='"namespace-declarations"' value="false"/>
  57. <normalizeDocument obj="doc"/>
  58. <getElementsByTagNameNS var="elemList" obj="doc" namespaceURI='"*"' localName='"acronym"' interface="Document"/>
  59. <item var="elemName" obj="elemList" index="1" interface="NodeList"/>
  60. <nodeName var="nodeName" obj="elemName"/>
  61. <assertEquals actual="nodeName" expected='"address"' id="documentnormalizedocument11_namespaceDeclarations" ignoreCase="false"/>
  62. </if>
  63.  
  64. </test>
  65.  
  66.