/*
 * Copyright (C) 2006 Apple Computer, Inc.
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Library General Public
 * License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Library General Public License for more details.
 *
 * You should have received a copy of the GNU Library General Public License
 * along with this library; see the file COPYING.LIB.  If not, write to
 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 * Boston, MA 02110-1301, USA.
 */

[
    Constructor,
    ImplementationLacksVTable
] interface XPathEvaluator {
    [RaisesException] XPathExpression createExpression([Default=Undefined] optional DOMString expression,
                                     [Default=Undefined] optional XPathNSResolver resolver);

    XPathNSResolver createNSResolver([Default=Undefined] optional Node nodeResolver);

    [RaisesException] XPathResult evaluate([Default=Undefined] optional DOMString expression,
                         [Default=Undefined] optional Node contextNode, 
                         [Default=Undefined] optional XPathNSResolver resolver,
                         [Default=Undefined] optional unsigned short type,
                         [Default=Undefined] optional XPathResult inResult);
};
