1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23 24#ifndef __com_sun_star_xml_XPath_XXPathAPI_idl__ 25#define __com_sun_star_xml_XPath_XXPathAPI_idl__ 26 27#ifndef __com_sun_star_uno_XInterface_idl__ 28#include <com/sun/star/uno/XInterface.idl> 29#endif 30#ifndef __com_sun_star_xml_dom_XNode_idl__ 31#include <com/sun/star/xml/dom/XNode.idl> 32#endif 33#ifndef __com_sun_star_xml_dom_XNodeList_idl__ 34#include <com/sun/star/xml/dom/XNodeList.idl> 35#endif 36#ifndef __com_sun_star_xml_xpath_XXPathObject_idl__ 37#include <com/sun/star/xml/xpath/XXPathObject.idl> 38#endif 39#ifndef __com_sun_star_xml_xpath_XXPathExtension_idl__ 40#include <com/sun/star/xml/xpath/XXPathExtension.idl> 41#endif 42#ifndef __com_sun_star_xml_XPath_XPathException_idl__ 43#include <com/sun/star/xml/xpath/XPathException.idl> 44#endif 45 46 47module com { module sun { module star { module xml { module xpath { 48 49 50interface XXPathAPI : com::sun::star::uno::XInterface 51{ 52 53 void registerNS( 54 [in] string prefix, 55 [in] string url); 56 57 void unregisterNS( 58 [in] string prefix, 59 [in] string url); 60 61 void registerExtension( [in] string serviceName ); 62 void registerExtensionInstance( 63 [in] com::sun::star::xml::xpath::XXPathExtension aExtension); 64 65 /** Eval XPath Expression. 66 67 @param contextNode 68 the context node (expression is relative to this node) 69 70 @param expr 71 the XPath expression 72 73 @throws XPathException 74 if the expression is malformed, or evaluation fails 75 76 @returns 77 an object representing the result of the XPath evaluation 78 79 @see XXPathObject 80 */ 81 XXPathObject eval( 82 [in] com::sun::star::xml::dom::XNode contextNode, 83 [in] string expr) 84 raises( com::sun::star::xml::xpath::XPathException ); 85 86 /** Eval XPath Expression. 87 88 @param contextNode 89 the context node (expression is relative to this node) 90 91 @param expr 92 the XPath expression 93 94 @param namespaceNode 95 all namespaces declared on this node will be registered 96 97 @throws XPathException 98 if the expression is malformed, or evaluation fails 99 100 @returns 101 an object representing the result of the XPath evaluation 102 103 @see XXPathObject 104 */ 105 XXPathObject evalNS( 106 [in] com::sun::star::xml::dom::XNode contextNode, 107 [in] string expr, 108 [in] com::sun::star::xml::dom::XNode namespaceNode) 109 raises( com::sun::star::xml::xpath::XPathException ); 110 111 /** Evaluate an XPath expression to select a list of nodes. 112 113 @param contextNode 114 the context node (expression is relative to this node) 115 116 @param expr 117 the XPath expression 118 119 @throws XPathException 120 if the expression is malformed, or evaluation fails 121 122 @returns 123 result of the XPath evaluation: a list of nodes 124 125 @see XNodeList 126 */ 127 com::sun::star::xml::dom::XNodeList selectNodeList( 128 [in] com::sun::star::xml::dom::XNode contextNode, 129 [in] string expr) 130 raises( com::sun::star::xml::xpath::XPathException ); 131 132 /** Evaluate an XPath expression to select a list of nodes. 133 134 @param contextNode 135 the context node (expression is relative to this node) 136 137 @param expr 138 the XPath expression 139 140 @param namespaceNode 141 all namespaces declared on this node will be registered 142 143 @throws XPathException 144 if the expression is malformed, or evaluation fails 145 146 @returns 147 result of the XPath evaluation: a list of nodes 148 149 @see XNodeList 150 */ 151 com::sun::star::xml::dom::XNodeList selectNodeListNS( 152 [in] com::sun::star::xml::dom::XNode contextNode, 153 [in] string str, 154 [in] com::sun::star::xml::dom::XNode namespaceNode) 155 raises( com::sun::star::xml::xpath::XPathException ); 156 157 /** Evaluate an XPath expression to select a single node. 158 159 @param contextNode 160 the context node (expression is relative to this node) 161 162 @param expr 163 the XPath expression 164 165 @throws XPathException 166 if the expression is malformed, or evaluation fails 167 168 @returns 169 result of the XPath evaluation: a single node 170 */ 171 com::sun::star::xml::dom::XNode selectSingleNode( 172 [in] com::sun::star::xml::dom::XNode contextNode, 173 [in] string expr) 174 raises( com::sun::star::xml::xpath::XPathException ); 175 176 /** Evaluate an XPath expression to select a single node. 177 178 @param contextNode 179 the context node (expression is relative to this node) 180 181 @param expr 182 the XPath expression 183 184 @param namespaceNode 185 all namespaces declared on this node will be registered 186 187 @throws XPathException 188 if the expression is malformed, or evaluation fails 189 190 @returns 191 result of the XPath evaluation: a single node 192 */ 193 com::sun::star::xml::dom::XNode selectSingleNodeNS( 194 [in] com::sun::star::xml::dom::XNode contextNode, 195 [in] string str, 196 [in] com::sun::star::xml::dom::XNode namespaceNode) 197 raises( com::sun::star::xml::xpath::XPathException ); 198 199}; 200 201}; }; }; }; }; 202 203#endif 204