Subversion Repositories Kolibri OS

Rev

Go to most recent revision | Blame | Last modification | View Log | Download | RSS feed

  1. <?xml version="1.0" standalone="no"?>
  2. <?xml-stylesheet href="test-to-html.xsl" type="text/xml"?>
  3. <!--
  4.  
  5. Copyright (c) 2003 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. <!DOCTYPE test SYSTEM "dom3.dtd">
  18.  
  19.  
  20. <test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="SystemId2">
  21.  <metadata>
  22.    <title>SystemId2</title>
  23.    <creator>Curt Arnold</creator>
  24.    <description>Writes a document to a URL for a temporary http document and rereads the document.</description>
  25.         <date qualifier="created">2003-12-08</date>
  26.         <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSInput-systemId"/>
  27.         <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSOutput-systemId"/>
  28.  </metadata>
  29.  <implementationAttribute name="validating" value="false"/>
  30.  
  31.  <var name="testDoc" type="Document"/>
  32.  <var name="domImpl" type="DOMImplementationLS"/>
  33.  <var name="output" type="LSOutput"/>
  34.  <var name="serializer" type="LSSerializer"/>
  35.  <var name="systemId" type="DOMString"/>
  36.  <var name="checkSystemId" type="DOMString"/>
  37.  <var name="status" type="boolean"/>
  38.  <var name="input" type="LSInput"/>
  39.  <var name="parser" type="LSParser"/>
  40.  <var name="checkDoc" type="Document"/>
  41.  <var name="docElem" type="Element"/>
  42.  <var name="docElemName" type="DOMString"/>
  43.  <var name="NULL_SCHEMA_TYPE" type="DOMString" isNull="true"/>
  44.  
  45.  <load var="testDoc" href="test0" willBeModified="false"/>
  46.  <implementation var="domImpl"/>
  47.  
  48.  <!--   create an LSOutput and connect it to an stock LSWriter   -->
  49.  <createLSOutput var="output" obj="domImpl"/>
  50.  <!--   check that it was initially null    -->
  51.  <systemId var="checkSystemId" obj="output" interface="LSOutput"/>
  52.  <assertNull actual="checkSystemId" id="LSOutputSystemIdInitiallyNull"/>
  53.  <createTempURI var="systemId" scheme="http"/>
  54.  <systemId obj="output" value="systemId" interface="LSOutput"/>
  55.  <systemId var="checkSystemId" obj="output" interface="LSOutput"/>
  56.  <assertEquals expected="systemId"
  57.         actual="checkSystemId"
  58.         ignoreCase="false"
  59.         id="LSOutputSystemIdMatch"/>
  60.  
  61.  <!--   create a serializer and write a test document    -->
  62.  <createLSSerializer var="serializer" obj="domImpl"/>
  63.  <write var="status" obj="serializer" destination="output" nodeArg="testDoc"/>
  64.  <assertTrue actual="status" id="writeStatus"/>
  65.  
  66.  <!--   read the serialized document   -->
  67.  <createLSInput var="input" obj="domImpl"/>
  68.  <systemId var="checkSystemId" obj="input" interface="LSInput"/>
  69.  <assertNull actual="checkSystemId" id="LSInputSystemIdInitiallyNull"/>
  70.  <systemId obj="input" value="systemId" interface="LSInput"/>
  71.  <systemId var="checkSystemId" obj="input" interface="LSInput"/>
  72.  <assertEquals expected="systemId"
  73.         actual="checkSystemId"
  74.         ignoreCase="false"
  75.         id="LSInputSystemIdMatch"/>
  76.  <createLSParser var="parser" obj="domImpl" schemaType="NULL_SCHEMA_TYPE" mode="1"/>
  77.  <parse var="checkDoc" obj="parser" input="input"/>
  78.  <assertNotNull actual="checkDoc" id="checkNotNull"/>
  79.  <documentElement var="docElem" obj="checkDoc"/>
  80.  <nodeName var="docElemName" obj="docElem"/>
  81.  <assertEquals expected='"elt0"' actual="docElemName" id="checkDocElemName" ignoreCase="false"/>  
  82. </test>
  83.  
  84.  
  85.  
  86.  
  87.  
  88.