com.jclark.xsl.om
Interface NamespacePrefixMap


public interface NamespacePrefixMap

associates Namespaces with prefixes


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 qName
 Name expandElementTypeName(java.lang.String qName, Node node)
          returns the two-part Name for the given qName
 java.lang.String getDefaultNamespace()
           
 java.lang.String getNamespace(int i)
           
 java.lang.String getNamespace(java.lang.String prefix)
           
 NameTable getNameTable()
           
 java.lang.String getPrefix(int i)
           
 java.lang.String getPrefix(java.lang.String namespace)
           
 int getSize()
           
 NamespacePrefixMap unbind(java.lang.String prefix)
          removes the association of a prefix with a namespace
 NamespacePrefixMap unbindDefault()
          remove the default namespace
 

Method Detail

getNameTable

public NameTable getNameTable()

expandAttributeName

public Name expandAttributeName(java.lang.String qName,
                                Node node)
                         throws XSLException
returns the two-part Name for the given qName
Parameters:
node - -- provided for particularizing any Exception

expandElementTypeName

public Name expandElementTypeName(java.lang.String qName,
                                  Node node)
                           throws XSLException
returns the two-part Name for the given qName
Parameters:
node - -- provided for particularizing any Exception

bind

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

bindDefault

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

unbindDefault

public NamespacePrefixMap unbindDefault()
remove the default namespace

unbind

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

getDefaultNamespace

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

getSize

public int getSize()
Returns:
the number of bindings in this map

getPrefix

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

getNamespace

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

getPrefix

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

getNamespace

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