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="textiselementcontentwhitespace04">
  20. <metadata>
  21. <title>textiselementcontentwhitespace04</title>
  22. <creator>Curt Arnold</creator>
  23. <description>
  24. Replace the text node child of the "p" element in barfoo with whitespace and normalize with validation.
  25. isElementContentWhitespace should be false since the node is not in element content.  
  26. </description>
  27. <contributor>Curt Arnold</contributor>
  28. <date qualifier="created">2004-01-05</date>
  29. <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Text3-isElementContentWhitespace"/>
  30. </metadata>
  31. <var name="doc" type="Document"/>
  32. <var name="pList" type="NodeList"/>
  33. <var name="pElem" type="Element"/>
  34. <var name="textNode" type="Text"/>
  35. <var name="blankNode" type="Text"/>
  36. <var name="returnedNode" type="Node"/>
  37. <var name="isElemContentWhitespace" type="boolean"/>
  38. <var name="domConfig" type="DOMConfiguration"/>
  39. <var name="canSetValidation" type="boolean"/>
  40. <var name="replacedNode" type="Node"/>
  41. <load var="doc" href="barfoo" willBeModified="true"/>
  42. <domConfig var="domConfig" obj="doc" interface="Document"/>
  43. <canSetParameter var="canSetValidation" obj="domConfig" name='"validate"' value="true"/>
  44. <if>
  45.         <isTrue value="canSetValidation"/>
  46.         <setParameter obj="domConfig" name='"validate"' value="true"/>
  47.         <getElementsByTagName var="pList" obj="doc" tagname='"p"' interface="Document"/>
  48.         <item var="pElem" obj="pList" index="0" interface="NodeList"/>
  49.         <firstChild var="textNode" obj="pElem" interface="Node"/>
  50.         <createTextNode var="blankNode" obj="doc" data='"   "'/>
  51.         <replaceChild var="replacedNode" obj="pElem" newChild="blankNode" oldChild="textNode"/>
  52.         <normalizeDocument obj="doc"/>
  53.         <firstChild var="textNode" obj="pElem" interface="Node"/>
  54.         <isElementContentWhitespace obj="textNode" var="isElemContentWhitespace"/>
  55.         <assertFalse actual="isElemContentWhitespace" id="notElemContent"/>
  56. </if>
  57. </test>
  58.