public class OMElementUtils
extends java.lang.Object
Constructor and Description |
---|
OMElementUtils() |
Modifier and Type | Method and Description |
---|---|
static void |
addNameSpaces(org.jaxen.XPath xpath,
org.apache.axiom.om.OMElement elem,
org.apache.commons.logging.Log log)
Add the namespace declarations of a given
OMElement to the namespace
context of an XPath expression. |
static java.lang.String |
getNameSpaceWithPrefix(java.lang.String prefix,
org.apache.axiom.om.OMElement elem)
Return the namespace with the given prefix, using the given element
|
public static java.lang.String getNameSpaceWithPrefix(java.lang.String prefix, org.apache.axiom.om.OMElement elem)
prefix
- the prefix looked upelem
- the source element to usepublic static void addNameSpaces(org.jaxen.XPath xpath, org.apache.axiom.om.OMElement elem, org.apache.commons.logging.Log log)
OMElement
to the namespace
context of an XPath expression. Typically this method is used with an XPath
expression appearing in an attribute of the given element.
Note that the default namespace is explicitly excluded and not added to the namespace context. This implies that XPath expressions appearing in Synapse configuration files follow the same rule as in XSL stylesheets. Indeed, the XSLT specification defines the namespace context of an XPath expression as follows:
the set of namespace declarations are those in scope on the element which has the attribute in which the expression occurs; [...] the default namespace (as declared by xmlns) is not part of this set
xpath
- elem
- log
- Copyright © 2005-2021 Apache Software Foundation. All Rights Reserved.