com.jclark.xsl.om
Interface NamespacePrefixMap


public interface NamespacePrefixMap

Associates namespaces with prefixes. Every Node in a document is associated with a NameSpacePrefixMap which represents all the in-scope namespace bindings for that Node


Method Summary
 NamespacePrefixMap bind(java.lang.String prefix, java.lang.String namespace)
          record the association of a prefix to a namespace
 NamespacePrefixMap bindDefault(java.lang.String namespace)
          identify the given namespace as the default namespace
 Name expandAttributeName(java.lang.String qName, Node node)
          returns the two-part Name for the given Attribute's qName non-colonized names are returned as belonging to no namespace
 Name expandElementTypeName(java.lang.String qName, Node node)
          returns the two-part Name for the given qName non-colonized names are identified in the default namespace, if there is one, else no namespace
 java.lang.String getDefaultNamespace()
           
 java.lang.String getNamespace(int i)
           
 java.lang.String getNamespace(java.lang.String prefix)
           
 NameTable getNameTable()
          A NamespacePrefixMap is associated with a single NameTable
 java.lang.String getPrefix(int i)
           
 java.lang.String getPrefix(java.lang.String namespace)
           
 int getSize()
          The number of bound prefixes
 NamespacePrefixMap unbind(java.lang.String prefix)
          removes the association of a prefix with a namespace
 NamespacePrefixMap unbindDefault()
          remove the default namespace
 

Method Detail

getNameTable

NameTable getNameTable()
A NamespacePrefixMap is associated with a single NameTable


expandAttributeName

Name expandAttributeName(java.lang.String qName,
                         Node node)
                         throws XSLException
returns the two-part Name for the given Attribute's qName non-colonized names are returned as belonging to no namespace

Parameters:
node - -- provided for particularizing any Exception with Location
Throws:
XSLException - -- if there's no binding for the prefix

expandElementTypeName

Name expandElementTypeName(java.lang.String qName,
                           Node node)
                           throws XSLException
returns the two-part Name for the given qName non-colonized names are identified in the default namespace, if there is one, else no namespace

Parameters:
node - -- provided for particularizing any Exception with Location
Throws:
XSLException - -- if there's no binding for the prefix

bind

NamespacePrefixMap bind(java.lang.String prefix,
                        java.lang.String namespace)
record the association of a prefix to a namespace


bindDefault

NamespacePrefixMap bindDefault(java.lang.String namespace)
identify the given namespace as the default namespace


unbindDefault

NamespacePrefixMap unbindDefault()
remove the default namespace


unbind

NamespacePrefixMap unbind(java.lang.String prefix)
removes the association of a prefix with a namespace


getDefaultNamespace

java.lang.String getDefaultNamespace()
Returns:
the default namespace (which needs no prefix)

getSize

int getSize()
The number of bound prefixes

Returns:
the number of bindings in this map

getPrefix

java.lang.String getPrefix(int i)
Returns:
the i'th prefix

getNamespace

java.lang.String getNamespace(int i)
Returns:
the i'th namespace

getPrefix

java.lang.String getPrefix(java.lang.String namespace)
Returns:
the (first??) prefix bound to the given namespace (or null)

getNamespace

java.lang.String getNamespace(java.lang.String prefix)
Returns:
the namespace bound to the given prefix (or null)