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) 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="datatypenormalization14">
  20. <metadata>
  21. <title>datatypenormalization14</title>
  22. <creator>Curt Arnold</creator>
  23. <description>
  24. Parse document with datatype-normalization set to true.
  25. Check if string values were normalized per explicit whitespace=preserve.
  26. </description>
  27. <date qualifier="created">2004-03-29</date>
  28. <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSParser-parseURI"/>
  29. <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-datatype-normalization"/>
  30. </metadata>
  31. <var name="doc" type="Document"/>
  32. <var name="elemList" type="NodeList"/>
  33. <var name="element" type="Element"/>
  34. <var name="domConfig" type="DOMConfiguration"/>
  35. <var name="str" type="DOMString"/>
  36. <var name="canSetNormalization" type="boolean"/>
  37. <var name="canSetValidate" type="boolean"/>
  38. <var name="canSetXMLSchema" type="boolean"/>
  39. <var name="xsdNS" type="DOMString" value='"http://www.w3.org/2001/XMLSchema"'/>
  40. <var name="childNode" type="Node"/>
  41. <var name="childValue" type="DOMString"/>
  42.  
  43. <var name="domImplLS" type="DOMImplementationLS"/>
  44. <var name="lsParser" type="LSParser"/>
  45. <var name="nullSchemaType" type="DOMString" isNull="true"/>
  46. <var name="resourceURI" type="DOMString"/>
  47. <implementation var="domImplLS"/>
  48. <createLSParser var="lsParser" obj="domImplLS" mode="1" schemaType="xsdNS"/>
  49. <if><isNull obj="lsParser"/><return/></if>
  50. <domConfig obj="lsParser" var="domConfig" interface="LSParser"/>
  51.  
  52. <canSetParameter var="canSetNormalization" obj="domConfig" name='"datatype-normalization2"' value="true"/>
  53. <canSetParameter var="canSetValidate" obj="domConfig" name='"validate"' value="true"/>
  54. <canSetParameter var="canSetXMLSchema" obj="domConfig"  name='"schema-type"' value="xsdNS"/>
  55. <if>
  56.        <and>
  57.                <isTrue value="canSetNormalization"/>
  58.                <isTrue value="canSetValidate"/>
  59.                <isTrue value="canSetXMLSchema"/>
  60.        </and>
  61.        <setParameter obj="domConfig" name='"datatype-normalization"' value="true"/>
  62.        <setParameter obj="domConfig" name='"validate"' value="true"/>
  63.        <setParameter obj="domConfig" name='"schema-type"' value='xsdNS'/>
  64.        <getResourceURI var="resourceURI" href='"datatype_normalization2"' contentType="text/xml"/>
  65.        <parseURI var="doc" obj="lsParser" uri="resourceURI"/>
  66.        <getElementsByTagNameNS
  67.                var="elemList"
  68.                obj="doc"
  69.                namespaceURI='"http://www.w3.org/1999/xhtml"'
  70.                localName='"acronym"'
  71.                interface="Document"/>
  72.        <item var="element" obj="elemList" interface="NodeList" index="0"/>
  73.        <firstChild var="childNode" obj="element" interface="Node"/>
  74.        <assertNotNull actual="childNode" id="childNodeNotNull"/>
  75.        <nodeValue var="childValue" obj="childNode"/>
  76.        <assertEquals actual="childValue" expected='"    EMP  0001   "' ignoreCase="false" id="content"/>
  77. </if>
  78. </test>
  79.  
  80.  
  81.