Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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

    public NameTable getNameTable()

  A NamespacePrefixMap is associated with a single NameTable

### expandAttributeName

    public 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

    public 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

    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()

  The number of bound prefixes

  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)

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD