com.jclark.xsl.om

Interface NamespacePrefixMap

public interface NamespacePrefixMap

associates Namespaces with prefixes

Method Summary

NamespacePrefixMap
bind(String prefix, String namespace)
record the association of a prefix to a namespace
NamespacePrefixMap
bindDefault(String namespace)
identify the given namespace as the default namespace
Name
expandAttributeName(String qName, Node node)
returns the two-part Name for the given qName
Name
expandElementTypeName(String qName, Node node)
returns the two-part Name for the given qName
String
getDefaultNamespace()
NameTable
getNameTable()
String
getNamespace(String prefix)
String
getNamespace(int i)
String
getPrefix(String namespace)
String
getPrefix(int i)
int
getSize()
NamespacePrefixMap
unbind(String prefix)
removes the association of a prefix with a namespace
NamespacePrefixMap
unbindDefault()
remove the default namespace

Method Details

bind

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

bindDefault

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

expandAttributeName

public Name expandAttributeName(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(String qName,
                                  Node node)
            throws XSLException
returns the two-part Name for the given qName
Parameters:
node - -- provided for particularizing any Exception

getDefaultNamespace

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

getNameTable

public NameTable getNameTable()

getNamespace

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

getNamespace

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

getPrefix

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

getPrefix

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

getSize

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

unbind

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

unbindDefault

public NamespacePrefixMap unbindDefault()
remove the default namespace