1*cdf0e10cSrcweir/************************************************************************* 2*cdf0e10cSrcweir * 3*cdf0e10cSrcweir * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4*cdf0e10cSrcweir * 5*cdf0e10cSrcweir * Copyright 2000, 2010 Oracle and/or its affiliates. 6*cdf0e10cSrcweir * 7*cdf0e10cSrcweir * OpenOffice.org - a multi-platform office productivity suite 8*cdf0e10cSrcweir * 9*cdf0e10cSrcweir * This file is part of OpenOffice.org. 10*cdf0e10cSrcweir * 11*cdf0e10cSrcweir * OpenOffice.org is free software: you can redistribute it and/or modify 12*cdf0e10cSrcweir * it under the terms of the GNU Lesser General Public License version 3 13*cdf0e10cSrcweir * only, as published by the Free Software Foundation. 14*cdf0e10cSrcweir * 15*cdf0e10cSrcweir * OpenOffice.org is distributed in the hope that it will be useful, 16*cdf0e10cSrcweir * but WITHOUT ANY WARRANTY; without even the implied warranty of 17*cdf0e10cSrcweir * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18*cdf0e10cSrcweir * GNU Lesser General Public License version 3 for more details 19*cdf0e10cSrcweir * (a copy is included in the LICENSE file that accompanied this code). 20*cdf0e10cSrcweir * 21*cdf0e10cSrcweir * You should have received a copy of the GNU Lesser General Public License 22*cdf0e10cSrcweir * version 3 along with OpenOffice.org. If not, see 23*cdf0e10cSrcweir * <http://www.openoffice.org/license.html> 24*cdf0e10cSrcweir * for a copy of the LGPLv3 License. 25*cdf0e10cSrcweir * 26*cdf0e10cSrcweir ************************************************************************/ 27*cdf0e10cSrcweir 28*cdf0e10cSrcweir#ifndef __com_sun_star_xml_XPath_XXPathAPI_idl__ 29*cdf0e10cSrcweir#define __com_sun_star_xml_XPath_XXPathAPI_idl__ 30*cdf0e10cSrcweir 31*cdf0e10cSrcweir#ifndef __com_sun_star_uno_XInterface_idl__ 32*cdf0e10cSrcweir#include <com/sun/star/uno/XInterface.idl> 33*cdf0e10cSrcweir#endif 34*cdf0e10cSrcweir#ifndef __com_sun_star_xml_dom_XNode_idl__ 35*cdf0e10cSrcweir#include <com/sun/star/xml/dom/XNode.idl> 36*cdf0e10cSrcweir#endif 37*cdf0e10cSrcweir#ifndef __com_sun_star_xml_dom_XNodeList_idl__ 38*cdf0e10cSrcweir#include <com/sun/star/xml/dom/XNodeList.idl> 39*cdf0e10cSrcweir#endif 40*cdf0e10cSrcweir#ifndef __com_sun_star_xml_xpath_XXPathObject_idl__ 41*cdf0e10cSrcweir#include <com/sun/star/xml/xpath/XXPathObject.idl> 42*cdf0e10cSrcweir#endif 43*cdf0e10cSrcweir#ifndef __com_sun_star_xml_xpath_XXPathExtension_idl__ 44*cdf0e10cSrcweir#include <com/sun/star/xml/xpath/XXPathExtension.idl> 45*cdf0e10cSrcweir#endif 46*cdf0e10cSrcweir#ifndef __com_sun_star_xml_XPath_XPathException_idl__ 47*cdf0e10cSrcweir#include <com/sun/star/xml/xpath/XPathException.idl> 48*cdf0e10cSrcweir#endif 49*cdf0e10cSrcweir 50*cdf0e10cSrcweir 51*cdf0e10cSrcweirmodule com { module sun { module star { module xml { module xpath { 52*cdf0e10cSrcweir 53*cdf0e10cSrcweir 54*cdf0e10cSrcweirinterface XXPathAPI : com::sun::star::uno::XInterface 55*cdf0e10cSrcweir{ 56*cdf0e10cSrcweir 57*cdf0e10cSrcweir void registerNS( 58*cdf0e10cSrcweir [in] string prefix, 59*cdf0e10cSrcweir [in] string url); 60*cdf0e10cSrcweir 61*cdf0e10cSrcweir void unregisterNS( 62*cdf0e10cSrcweir [in] string prefix, 63*cdf0e10cSrcweir [in] string url); 64*cdf0e10cSrcweir 65*cdf0e10cSrcweir void registerExtension( [in] string serviceName ); 66*cdf0e10cSrcweir void registerExtensionInstance( 67*cdf0e10cSrcweir [in] com::sun::star::xml::xpath::XXPathExtension aExtension); 68*cdf0e10cSrcweir 69*cdf0e10cSrcweir /** Eval XPath Expression. 70*cdf0e10cSrcweir 71*cdf0e10cSrcweir @param contextNode 72*cdf0e10cSrcweir the context node (expression is relative to this node) 73*cdf0e10cSrcweir 74*cdf0e10cSrcweir @param expr 75*cdf0e10cSrcweir the XPath expression 76*cdf0e10cSrcweir 77*cdf0e10cSrcweir @throws XPathException 78*cdf0e10cSrcweir if the expression is malformed, or evaluation fails 79*cdf0e10cSrcweir 80*cdf0e10cSrcweir @returns 81*cdf0e10cSrcweir an object representing the result of the XPath evaluation 82*cdf0e10cSrcweir 83*cdf0e10cSrcweir @see XXPathObject 84*cdf0e10cSrcweir */ 85*cdf0e10cSrcweir XXPathObject eval( 86*cdf0e10cSrcweir [in] com::sun::star::xml::dom::XNode contextNode, 87*cdf0e10cSrcweir [in] string expr) 88*cdf0e10cSrcweir raises( com::sun::star::xml::xpath::XPathException ); 89*cdf0e10cSrcweir 90*cdf0e10cSrcweir /** Eval XPath Expression. 91*cdf0e10cSrcweir 92*cdf0e10cSrcweir @param contextNode 93*cdf0e10cSrcweir the context node (expression is relative to this node) 94*cdf0e10cSrcweir 95*cdf0e10cSrcweir @param expr 96*cdf0e10cSrcweir the XPath expression 97*cdf0e10cSrcweir 98*cdf0e10cSrcweir @param namespaceNode 99*cdf0e10cSrcweir all namespaces declared on this node will be registered 100*cdf0e10cSrcweir 101*cdf0e10cSrcweir @throws XPathException 102*cdf0e10cSrcweir if the expression is malformed, or evaluation fails 103*cdf0e10cSrcweir 104*cdf0e10cSrcweir @returns 105*cdf0e10cSrcweir an object representing the result of the XPath evaluation 106*cdf0e10cSrcweir 107*cdf0e10cSrcweir @see XXPathObject 108*cdf0e10cSrcweir */ 109*cdf0e10cSrcweir XXPathObject evalNS( 110*cdf0e10cSrcweir [in] com::sun::star::xml::dom::XNode contextNode, 111*cdf0e10cSrcweir [in] string expr, 112*cdf0e10cSrcweir [in] com::sun::star::xml::dom::XNode namespaceNode) 113*cdf0e10cSrcweir raises( com::sun::star::xml::xpath::XPathException ); 114*cdf0e10cSrcweir 115*cdf0e10cSrcweir /** Evaluate an XPath expression to select a list of nodes. 116*cdf0e10cSrcweir 117*cdf0e10cSrcweir @param contextNode 118*cdf0e10cSrcweir the context node (expression is relative to this node) 119*cdf0e10cSrcweir 120*cdf0e10cSrcweir @param expr 121*cdf0e10cSrcweir the XPath expression 122*cdf0e10cSrcweir 123*cdf0e10cSrcweir @throws XPathException 124*cdf0e10cSrcweir if the expression is malformed, or evaluation fails 125*cdf0e10cSrcweir 126*cdf0e10cSrcweir @returns 127*cdf0e10cSrcweir result of the XPath evaluation: a list of nodes 128*cdf0e10cSrcweir 129*cdf0e10cSrcweir @see XNodeList 130*cdf0e10cSrcweir */ 131*cdf0e10cSrcweir com::sun::star::xml::dom::XNodeList selectNodeList( 132*cdf0e10cSrcweir [in] com::sun::star::xml::dom::XNode contextNode, 133*cdf0e10cSrcweir [in] string expr) 134*cdf0e10cSrcweir raises( com::sun::star::xml::xpath::XPathException ); 135*cdf0e10cSrcweir 136*cdf0e10cSrcweir /** Evaluate an XPath expression to select a list of nodes. 137*cdf0e10cSrcweir 138*cdf0e10cSrcweir @param contextNode 139*cdf0e10cSrcweir the context node (expression is relative to this node) 140*cdf0e10cSrcweir 141*cdf0e10cSrcweir @param expr 142*cdf0e10cSrcweir the XPath expression 143*cdf0e10cSrcweir 144*cdf0e10cSrcweir @param namespaceNode 145*cdf0e10cSrcweir all namespaces declared on this node will be registered 146*cdf0e10cSrcweir 147*cdf0e10cSrcweir @throws XPathException 148*cdf0e10cSrcweir if the expression is malformed, or evaluation fails 149*cdf0e10cSrcweir 150*cdf0e10cSrcweir @returns 151*cdf0e10cSrcweir result of the XPath evaluation: a list of nodes 152*cdf0e10cSrcweir 153*cdf0e10cSrcweir @see XNodeList 154*cdf0e10cSrcweir */ 155*cdf0e10cSrcweir com::sun::star::xml::dom::XNodeList selectNodeListNS( 156*cdf0e10cSrcweir [in] com::sun::star::xml::dom::XNode contextNode, 157*cdf0e10cSrcweir [in] string str, 158*cdf0e10cSrcweir [in] com::sun::star::xml::dom::XNode namespaceNode) 159*cdf0e10cSrcweir raises( com::sun::star::xml::xpath::XPathException ); 160*cdf0e10cSrcweir 161*cdf0e10cSrcweir /** Evaluate an XPath expression to select a single node. 162*cdf0e10cSrcweir 163*cdf0e10cSrcweir @param contextNode 164*cdf0e10cSrcweir the context node (expression is relative to this node) 165*cdf0e10cSrcweir 166*cdf0e10cSrcweir @param expr 167*cdf0e10cSrcweir the XPath expression 168*cdf0e10cSrcweir 169*cdf0e10cSrcweir @throws XPathException 170*cdf0e10cSrcweir if the expression is malformed, or evaluation fails 171*cdf0e10cSrcweir 172*cdf0e10cSrcweir @returns 173*cdf0e10cSrcweir result of the XPath evaluation: a single node 174*cdf0e10cSrcweir */ 175*cdf0e10cSrcweir com::sun::star::xml::dom::XNode selectSingleNode( 176*cdf0e10cSrcweir [in] com::sun::star::xml::dom::XNode contextNode, 177*cdf0e10cSrcweir [in] string expr) 178*cdf0e10cSrcweir raises( com::sun::star::xml::xpath::XPathException ); 179*cdf0e10cSrcweir 180*cdf0e10cSrcweir /** Evaluate an XPath expression to select a single node. 181*cdf0e10cSrcweir 182*cdf0e10cSrcweir @param contextNode 183*cdf0e10cSrcweir the context node (expression is relative to this node) 184*cdf0e10cSrcweir 185*cdf0e10cSrcweir @param expr 186*cdf0e10cSrcweir the XPath expression 187*cdf0e10cSrcweir 188*cdf0e10cSrcweir @param namespaceNode 189*cdf0e10cSrcweir all namespaces declared on this node will be registered 190*cdf0e10cSrcweir 191*cdf0e10cSrcweir @throws XPathException 192*cdf0e10cSrcweir if the expression is malformed, or evaluation fails 193*cdf0e10cSrcweir 194*cdf0e10cSrcweir @returns 195*cdf0e10cSrcweir result of the XPath evaluation: a single node 196*cdf0e10cSrcweir */ 197*cdf0e10cSrcweir com::sun::star::xml::dom::XNode selectSingleNodeNS( 198*cdf0e10cSrcweir [in] com::sun::star::xml::dom::XNode contextNode, 199*cdf0e10cSrcweir [in] string str, 200*cdf0e10cSrcweir [in] com::sun::star::xml::dom::XNode namespaceNode) 201*cdf0e10cSrcweir raises( com::sun::star::xml::xpath::XPathException ); 202*cdf0e10cSrcweir 203*cdf0e10cSrcweir}; 204*cdf0e10cSrcweir 205*cdf0e10cSrcweir}; }; }; }; }; 206*cdf0e10cSrcweir 207*cdf0e10cSrcweir#endif 208