LibreOffice Module unoxml (master) 1
|
#include <xpathapi.hxx>
Public Member Functions | |
CXPathAPI (const css::uno::Reference< css::uno::XComponentContext > &) | |
virtual OUString SAL_CALL | getImplementationName () override |
virtual sal_Bool SAL_CALL | supportsService (const OUString &ServiceName) override |
virtual css::uno::Sequence< OUString > SAL_CALL | getSupportedServiceNames () override |
virtual void SAL_CALL | registerNS (const OUString &aPrefix, const OUString &aURI) override |
virtual void SAL_CALL | unregisterNS (const OUString &aPrefix, const OUString &aURI) override |
virtual css::uno::Reference< css::xml::dom::XNodeList > SAL_CALL | selectNodeList (const css::uno::Reference< css::xml::dom::XNode > &contextNode, const OUString &str) override |
Use an XPath string to select a nodelist. More... | |
virtual css::uno::Reference< css::xml::dom::XNodeList > SAL_CALL | selectNodeListNS (const css::uno::Reference< css::xml::dom::XNode > &contextNode, const OUString &str, const css::uno::Reference< css::xml::dom::XNode > &namespaceNode) override |
Use an XPath string to select a nodelist. More... | |
virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL | selectSingleNode (const css::uno::Reference< css::xml::dom::XNode > &contextNode, const OUString &str) override |
Use an XPath string to select a single node. More... | |
virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL | selectSingleNodeNS (const css::uno::Reference< css::xml::dom::XNode > &contextNode, const OUString &str, const css::uno::Reference< css::xml::dom::XNode > &namespaceNode) override |
Use an XPath string to select a single node. More... | |
virtual css::uno::Reference< css::xml::xpath::XXPathObject > SAL_CALL | eval (const css::uno::Reference< css::xml::dom::XNode > &contextNode, const OUString &str) override |
evaluates an XPath string. More... | |
virtual css::uno::Reference< css::xml::xpath::XXPathObject > SAL_CALL | evalNS (const css::uno::Reference< css::xml::dom::XNode > &contextNode, const OUString &str, const css::uno::Reference< css::xml::dom::XNode > &namespaceNode) override |
same as eval but registers all namespace declarations found on namespaceNode More... | |
virtual void SAL_CALL | registerExtension (const OUString &aName) override |
uses the service manager to create an instance of the service denoted by aName. More... | |
virtual void SAL_CALL | registerExtensionInstance (const css::uno::Reference< css::xml::xpath::XXPathExtension > &aExtension) override |
registers the given extension instance to be used by XPath evaluations performed through this XPathAPI instance More... | |
Private Attributes | |
std::mutex | m_Mutex |
nsmap_t | m_nsmap |
const css::uno::Reference< css::uno::XComponentContext > | m_xContext |
extensions_t | m_extensions |
Definition at line 51 of file xpathapi.hxx.
|
explicit |
Definition at line 51 of file xpathapi.cxx.
References m_xContext.
|
overridevirtual |
evaluates an XPath string.
relative XPath expressions are evaluated relative to the context Node
Definition at line 273 of file xpathapi.cxx.
References XPath::generic_error_func(), XPath::lcl_registerExtensions(), XPath::lcl_registerNamespaces(), m_extensions, m_Mutex, m_nsmap, OUStringToOString(), and XPath::structured_error_func().
Referenced by evalNS(), and selectNodeList().
|
overridevirtual |
same as eval but registers all namespace declarations found on namespaceNode
Definition at line 346 of file xpathapi.cxx.
References eval(), and XPath::lcl_collectRegisterNamespaces().
|
overridevirtual |
Definition at line 61 of file xpathapi.cxx.
|
overridevirtual |
Definition at line 56 of file xpathapi.cxx.
|
overridevirtual |
uses the service manager to create an instance of the service denoted by aName.
If the returned object implements the XXPathExtension interface, it is added to the list of extensions that are used when evaluating XPath strings with this XPathAPI instance
Definition at line 360 of file xpathapi.cxx.
References aName, m_extensions, m_Mutex, and m_xContext.
|
overridevirtual |
registers the given extension instance to be used by XPath evaluations performed through this XPathAPI instance
Definition at line 375 of file xpathapi.cxx.
References m_extensions, and m_Mutex.
|
overridevirtual |
Definition at line 71 of file xpathapi.cxx.
References m_Mutex, and m_nsmap.
Referenced by XPath::lcl_collectRegisterNamespaces().
|
overridevirtual |
Use an XPath string to select a nodelist.
Definition at line 175 of file xpathapi.cxx.
References eval().
Referenced by selectNodeListNS(), and selectSingleNode().
|
overridevirtual |
Use an XPath string to select a nodelist.
same as selectNodeList but registers all name space declarations found on namespaceNode
Definition at line 186 of file xpathapi.cxx.
References XPath::lcl_collectRegisterNamespaces(), and selectNodeList().
|
overridevirtual |
Use an XPath string to select a single node.
Same as selectNodeList but returns the first node (if any)
Definition at line 198 of file xpathapi.cxx.
References selectNodeList().
Referenced by selectSingleNodeNS().
|
overridevirtual |
Use an XPath string to select a single node.
Same as selectSingleNode but registers all namespaces declared on namespaceNode.
Definition at line 211 of file xpathapi.cxx.
References XPath::lcl_collectRegisterNamespaces(), and selectSingleNode().
|
overridevirtual |
Definition at line 66 of file xpathapi.cxx.
References cppu::supportsService().
|
overridevirtual |
Definition at line 80 of file xpathapi.cxx.
|
private |
Definition at line 59 of file xpathapi.hxx.
Referenced by eval(), registerExtension(), and registerExtensionInstance().
|
private |
Definition at line 56 of file xpathapi.hxx.
Referenced by eval(), registerExtension(), registerExtensionInstance(), registerNS(), and unregisterNS().
|
private |
Definition at line 57 of file xpathapi.hxx.
Referenced by eval(), registerNS(), and unregisterNS().
|
private |
Definition at line 58 of file xpathapi.hxx.
Referenced by registerExtension().