24#include <com/sun/star/uno/Sequence.hxx>
25#include <com/sun/star/xml/xpath/XPathAPI.hpp>
26#include <com/sun/star/xml/xpath/XPathExtension.hpp>
27#include <com/sun/star/util/SearchAlgorithms2.hpp>
29#include <osl/diagnose.h>
36using com::sun::star::xml::xpath::XPathAPI;
37using com::sun::star::xml::xpath::XXPathAPI;
38using com::sun::star::xml::xpath::XPathExtension;
39using com::sun::star::xml::xpath::XXPathExtension;
40using com::sun::star::xml::xpath::XPathObjectType_XPATH_UNDEFINED;
69 assert(pExpression &&
"no expression?");
73 aSearchOptions.
AlgorithmType2 = css::util::SearchAlgorithms2::REGEXP;
74 aSearchOptions.
searchString = OUString( pExpression, strlen(pExpression), RTL_TEXTENCODING_ASCII_US );
84 return (
nLength == 0 || bSearch )
85 && ( nStart == 0 && nEnd ==
nLength );
97 const OUString& sExpression )
99 OSL_ENSURE( rContext.
mxContextNode.is(),
"no context node in context" );
130 mxResult->getObjectType() != XPathObjectType_XPATH_UNDEFINED;
158 xXPath->registerExtensionInstance(aExtension);
164 sal_Int32
nCount = aPrefixes.getLength();
165 const OUString* pPrefixes = aPrefixes.getConstArray();
168 const OUString* pNamePrefix = &pPrefixes[
i];
170 aContext.
mxNamespaces->getByName( *pNamePrefix ) >>= sNameURL;
171 xXPath->registerNS( *pNamePrefix, sNameURL );
bool SearchForward(const OUString &rStr, sal_Int32 *pStart, sal_Int32 *pEnd, css::util::SearchResult *pRes=nullptr)
define the context for the evaluation of an XPath expression
css::uno::Reference< css::xforms::XModel > mxModel
css::uno::Reference< css::xml::dom::XNode > mxContextNode
css::uno::Reference< css::container::XNameContainer > mxNamespaces
Reference< XComponentContext > getProcessComponentContext()