Version 5.2.6.1, tag libreoffice-5.2.6.1
[LibreOffice.git] / offapi / com / sun / star / xml / xpath / XXPathAPI.idl
blobe400abff1487cebbef245ffff1ccceab7fe55a5a
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef __com_sun_star_xml_XPath_XXPathAPI_idl__
21 #define __com_sun_star_xml_XPath_XXPathAPI_idl__
23 #include <com/sun/star/uno/XInterface.idl>
24 #include <com/sun/star/xml/dom/XNode.idl>
25 #include <com/sun/star/xml/dom/XNodeList.idl>
26 #include <com/sun/star/xml/xpath/XXPathObject.idl>
27 #include <com/sun/star/xml/xpath/XXPathExtension.idl>
28 #include <com/sun/star/xml/xpath/XPathException.idl>
31 module com { module sun { module star { module xml { module xpath {
34 interface XXPathAPI : com::sun::star::uno::XInterface
37 void registerNS(
38 [in] string prefix,
39 [in] string url);
41 void unregisterNS(
42 [in] string prefix,
43 [in] string url);
45 void registerExtension( [in] string serviceName );
46 void registerExtensionInstance(
47 [in] com::sun::star::xml::xpath::XXPathExtension aExtension);
49 /** Evaluate XPath Expression.
51 @param contextNode
52 the context node (expression is relative to this node)
54 @param expr
55 the XPath expression
57 @throws XPathException
58 if the expression is malformed, or evaluation fails
60 @returns
61 an object representing the result of the XPath evaluation
63 @see XXPathObject
65 XXPathObject eval(
66 [in] com::sun::star::xml::dom::XNode contextNode,
67 [in] string expr)
68 raises( com::sun::star::xml::xpath::XPathException );
70 /** Evaluate XPath Expression.
72 @param contextNode
73 the context node (expression is relative to this node)
75 @param expr
76 the XPath expression
78 @param namespaceNode
79 all namespaces declared on this node will be registered
81 @throws XPathException
82 if the expression is malformed, or evaluation fails
84 @returns
85 an object representing the result of the XPath evaluation
87 @see XXPathObject
89 XXPathObject evalNS(
90 [in] com::sun::star::xml::dom::XNode contextNode,
91 [in] string expr,
92 [in] com::sun::star::xml::dom::XNode namespaceNode)
93 raises( com::sun::star::xml::xpath::XPathException );
95 /** Evaluate an XPath expression to select a list of nodes.
97 @param contextNode
98 the context node (expression is relative to this node)
100 @param expr
101 the XPath expression
103 @throws XPathException
104 if the expression is malformed, or evaluation fails
106 @returns
107 result of the XPath evaluation: a list of nodes
109 @see XNodeList
111 com::sun::star::xml::dom::XNodeList selectNodeList(
112 [in] com::sun::star::xml::dom::XNode contextNode,
113 [in] string expr)
114 raises( com::sun::star::xml::xpath::XPathException );
116 /** Evaluate an XPath expression to select a list of nodes.
118 @param contextNode
119 the context node (expression is relative to this node)
121 @param expr
122 the XPath expression
124 @param namespaceNode
125 all namespaces declared on this node will be registered
127 @throws XPathException
128 if the expression is malformed, or evaluation fails
130 @returns
131 result of the XPath evaluation: a list of nodes
133 @see XNodeList
135 com::sun::star::xml::dom::XNodeList selectNodeListNS(
136 [in] com::sun::star::xml::dom::XNode contextNode,
137 [in] string expr,
138 [in] com::sun::star::xml::dom::XNode namespaceNode)
139 raises( com::sun::star::xml::xpath::XPathException );
141 /** Evaluate an XPath expression to select a single node.
143 @param contextNode
144 the context node (expression is relative to this node)
146 @param expr
147 the XPath expression
149 @throws XPathException
150 if the expression is malformed, or evaluation fails
152 @returns
153 result of the XPath evaluation: a single node
155 com::sun::star::xml::dom::XNode selectSingleNode(
156 [in] com::sun::star::xml::dom::XNode contextNode,
157 [in] string expr)
158 raises( com::sun::star::xml::xpath::XPathException );
160 /** Evaluate an XPath expression to select a single node.
162 @param contextNode
163 the context node (expression is relative to this node)
165 @param expr
166 the XPath expression
168 @param namespaceNode
169 all namespaces declared on this node will be registered
171 @throws XPathException
172 if the expression is malformed, or evaluation fails
174 @returns
175 result of the XPath evaluation: a single node
177 com::sun::star::xml::dom::XNode selectSingleNodeNS(
178 [in] com::sun::star::xml::dom::XNode contextNode,
179 [in] string expr,
180 [in] com::sun::star::xml::dom::XNode namespaceNode)
181 raises( com::sun::star::xml::xpath::XPathException );
185 }; }; }; }; };
187 #endif
189 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */