Inherits javax::xml::namespace::NamespaceContext.
Public Member Functions | |
String | getNamespaceURI (String prefix) |
String | getPrefix (String namespaceURI) |
Iterator< String > | getPrefixes (String namespaceURI) |
void | addNamespace (String prefix, String uri) |
Support class for XPath queries which allows to bind XML namespaces to prefixes, using javax.xml.xpath.XPath#setNamespaceContext(javax.xml.namespace.NamespaceContext). This is especially needed for XPath queries on XML documents that use an (unnamed) default namespace, for which an "artificial" prefix must be defined and communicated to the XPath engine, so that the XPath expression can use that prefix in order to match the default namespace.
This class with its method addNamespace(String, String) This method serves a similar purpose as jdom's org.jdom.xpath.XPath#addNamespace(String, String) method.
Implementation note: we only keep a map to quickly go from prefix to namespace, but not the other way around. According to http://xml.apache.org/xalan-j/xpath_apis.html#namespacecontext the XPath processor in Xalan never needs the methods that return prefixes, thus their performance does not matter at the moment.
void alma.acs.config.validators.XmlNamespaceContextContainer.addNamespace | ( | String | prefix, | |
String | uri | |||
) |
Adds a prefix/namespace pair.
prefix | ||
uri |
Referenced by alma.acs.config.validators.ConfigFileRedeemerXml._isNotAConfigFile().
String alma.acs.config.validators.XmlNamespaceContextContainer.getNamespaceURI | ( | String | prefix | ) |
String alma.acs.config.validators.XmlNamespaceContextContainer.getPrefix | ( | String | namespaceURI | ) |
References alma.acs.config.validators.XmlNamespaceContextContainer.getPrefixes().
Iterator<String> alma.acs.config.validators.XmlNamespaceContextContainer.getPrefixes | ( | String | namespaceURI | ) |