W3C home > Mailing lists > Public > www-dom-ts@w3.org > April 2003

Framework support for obtaining an XPath evaluator

From: Curt Arnold <carnold@houston.rr.com>
Date: Fri, 18 Apr 2003 13:04:15 -0500
Message-ID: <3EA03E1F.8060501@houston.rr.com>
To: www-dom-ts@w3.org

For background:


Obtaining an XPathEvaluator for a test is a fairly process.  The current 
XPath tests have the following boilerplate:

   <!-- The following code is to create the evaluator using
        either the getFeature method defined in DOM3 or
        the cast mechanism. Implementation are not required
        to support both but at least one of them -->
   <assign var='xpEvaluator' value='null'/>
   <isSupported obj='doc' feature='&quot;core&quot;'
     version='&quot;3.0&quot;' var='state'/>
     <isTrue value='state' />
     <getFeature interface='Node' var='xpEvaluator' obj='doc'
     <isNull obj='xpEvaluator' />
     <assign var='xpEvaluator' value='doc'/>

Even as complex as this is, it would not support DOM XPath 
implementations like Xalan-J that are external to the DOM Core 
implementation.  To support tests that are not intentionally testing the 
mechanisms for obtaining XPathEvaluator's, I would like to add support 
for obtaining XPathEvaluator's to the framework.  This would be similar 
to the existing support for obtaining DOMImplementations.

I would suggesting adding the following statement to the DOM 3 TS 
language and supporting code to the Java and ECMAScript framework:

<createXPathEvaluator var="xpEvaluator" document="document"/>

After that I would like to add support for Xalan-J for XPath testing.

I've entered bugs #190 
(http://www.w3.org/Bugs/Public/show_bug.cgi?id=190) for the language 
enhancement and bug #191 for Xalan-J support.
Received on Friday, 18 April 2003 14:04:20 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:34:06 UTC