Subversion Repositories Kolibri OS

Rev

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

  1. <?xml version="1.0" encoding="iso-8859-1"?>
  2. <?xml-stylesheet href="test-to-html.xsl" type="text/xml"?>
  3. <!--
  4.  Copyright (c) 2003 World Wide Web Consortium,
  5.  
  6.  (Massachusetts Institute of Technology, European Research Consortium for
  7.  Informatics and Mathematics, Keio University). All Rights Reserved. This
  8.  work is distributed under the W3C(r) Software License [1] in the hope that
  9.  it will be useful, but WITHOUT ANY WARRANTY; without even the implied
  10.  warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  11.  
  12.  [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
  13. -->
  14.  
  15. <!DOCTYPE test SYSTEM "dom3.dtd" [
  16.   <!ENTITY % entities SYSTEM "dom3xpathents.ent">
  17.   %entities;
  18. ]>
  19. <test xmlns="&level3;" name="XPathExpression_evaluate_document">
  20.   <metadata>
  21.     <title>XPathExpression_evaluate_document</title>
  22.     <creator>Philippe Le Hégaret</creator>
  23.     <description>      
  24.       Test if XPathExpression.evaluate returns non-null result
  25.       using Document as contextNode.
  26.     </description>
  27.     <date qualifier="created">2003-12-02</date>
  28.     <subject resource="&spec;#XPathExpression-evaluate"/>
  29.   </metadata>
  30.   &vars;
  31.   <var name="nullNSResolver"  type="XPathNSResolver" isNull="true"/>
  32.   <var name="contextNode"     type='Element'/>
  33.   <var name="xpathResult"     type="XPathResult"/>
  34.   <var name="nullResult"      type="XPathResult" isNull="true"/>
  35.   <var name="xpathExpression" type="XPathExpression"/>
  36.   <var name="expression"      type="DOMString" value="&quot;/&quot;"/>
  37.  
  38.   &findXPathEvaluator;
  39.    
  40.   <assign value='doc' var='contextNode'/>
  41.  
  42.   <createExpression interface="XPathEvaluator"
  43.                     obj='xpEvaluator'
  44.                     var='xpathExpression'
  45.                     expression='expression'
  46.                     resolver='nullNSResolver'
  47.                     />
  48.  
  49.   <evaluate         interface="XPathExpression"
  50.                     obj='xpathExpression'
  51.                     var='xpathResult'
  52.                     contextNode='contextNode'
  53.                     type='0'
  54.                     result='nullResult'/>
  55.  
  56.   <assertNotNull actual="xpathResult" id="notnull"/>
  57.  
  58. </test>
  59.