org.apache.taglibs.standard.tag.common.xml
Class JSTLXPathNamespaceContext

java.lang.Object
  extended by org.apache.taglibs.standard.tag.common.xml.JSTLXPathNamespaceContext
All Implemented Interfaces:
javax.xml.namespace.NamespaceContext

public class JSTLXPathNamespaceContext
extends java.lang.Object
implements javax.xml.namespace.NamespaceContext

Implemenation of XML Namespace context processing given a URI or prefix


Constructor Summary
JSTLXPathNamespaceContext()
          No-arg constructor which would create empty HashMap of namespaces
JSTLXPathNamespaceContext(java.util.HashMap nses)
           
 
Method Summary
protected  void addNamespace(java.lang.String prefix, java.lang.String uri)
          Populate map of Prefix and NameSpace URI's entries
 java.lang.String getNamespaceURI(java.lang.String prefix)
          Get Namespace URI bound to a prefix in the current scope
 java.lang.String getPrefix(java.lang.String namespaceURI)
          Get Prefix bound to Namespace URI in the current scope
 java.util.Iterator getPrefixes(java.lang.String namespaceURI)
          Get all Prefixes bound to Namespace URI in the current scope
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JSTLXPathNamespaceContext

public JSTLXPathNamespaceContext()
No-arg constructor which would create empty HashMap of namespaces


JSTLXPathNamespaceContext

public JSTLXPathNamespaceContext(java.util.HashMap nses)
Method Detail

getNamespaceURI

public java.lang.String getNamespaceURI(java.lang.String prefix)
                                 throws java.lang.IllegalArgumentException
Get Namespace URI bound to a prefix in the current scope

Specified by:
getNamespaceURI in interface javax.xml.namespace.NamespaceContext
Parameters:
Prefix - Parameter
Returns:
Namespace URI bound to prefix
Throws:
java.lang.IllegalArgumentException - if prefix is null

getPrefix

public java.lang.String getPrefix(java.lang.String namespaceURI)
Get Prefix bound to Namespace URI in the current scope

Specified by:
getPrefix in interface javax.xml.namespace.NamespaceContext
Parameters:
Namespace - URI
Returns:
Prefix bound to Namespace URI
Throws:
java.lang.IllegalArgumentException - if Namespace URI is null

getPrefixes

public java.util.Iterator getPrefixes(java.lang.String namespaceURI)
Get all Prefixes bound to Namespace URI in the current scope

Specified by:
getPrefixes in interface javax.xml.namespace.NamespaceContext
Parameters:
Namespace - URI
Returns:
Iterator of Prefixes bound to Namespace URI
Throws:
java.lang.IllegalArgumentException - if Namespace URI is null

addNamespace

protected void addNamespace(java.lang.String prefix,
                            java.lang.String uri)
Populate map of Prefix and NameSpace URI's entries



Copyright (c) 1999-2012 Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.