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