Class JSTLXPathNamespaceContext
- java.lang.Object
-
- org.apache.taglibs.standard.tag.common.xml.JSTLXPathNamespaceContext
-
- All Implemented Interfaces:
NamespaceContext
public class JSTLXPathNamespaceContext extends Object implements NamespaceContext
Implemenation of XML Namespace context processing given a URI or prefix
-
-
Constructor Summary
Constructors Constructor Description JSTLXPathNamespaceContext()No-arg constructor which would create empty HashMap of namespacesJSTLXPathNamespaceContext(HashMap<String,String> nses)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddNamespace(String prefix, String uri)Populate map of Prefix and NameSpace URI's entriesStringgetNamespaceURI(String prefix)Get Namespace URI bound to a prefix in the current scopeStringgetPrefix(String namespaceURI)Get Prefix bound to Namespace URI in the current scopeIterator<String>getPrefixes(String namespaceURI)Get all Prefixes bound to Namespace URI in the current scope
-
-
-
Method Detail
-
getNamespaceURI
public String getNamespaceURI(String prefix) throws IllegalArgumentException
Get Namespace URI bound to a prefix in the current scope- Specified by:
getNamespaceURIin interfaceNamespaceContext- Parameters:
prefix- Parameter- Returns:
- Namespace URI bound to prefix
- Throws:
IllegalArgumentException- if prefix is null
-
getPrefix
public String getPrefix(String namespaceURI)
Get Prefix bound to Namespace URI in the current scope- Specified by:
getPrefixin interfaceNamespaceContext- Parameters:
namespaceURI- Namespace URI- Returns:
- Prefix bound to Namespace URI
- Throws:
IllegalArgumentException- if Namespace URI is null
-
getPrefixes
public Iterator<String> getPrefixes(String namespaceURI)
Get all Prefixes bound to Namespace URI in the current scope- Specified by:
getPrefixesin interfaceNamespaceContext- Parameters:
namespaceURI- Namespace URI- Returns:
- Iterator of Prefixes bound to Namespace URI
- Throws:
IllegalArgumentException- if Namespace URI is null
-
-