com.ihr.xbrl.om

## Class XBRLNamespaceContext

- java.lang.Object
- - com.ihr.xbrl.om.XBRLNamespaceContext

- All Implemented Interfaces:
    javax.xml.namespace.NamespaceContext, net.sf.saxon.om.NamespaceResolver
  Direct Known Subclasses:
    HTMLHandlerNamespaceContext, TransformNamespaceContext

      public class XBRLNamespaceContext
      extends java.lang.Object
      implements javax.xml.namespace.NamespaceContext, net.sf.saxon.om.NamespaceResolver

  This class handles resolution of prefixes to namespaces and vice-versa. This class plays the role of an XPE Namespace Context and a Saxon NamespaceResolver.

  Static namespaces defined in this class includes:

  xml : `XBRL.XML_baseNS`
  xbrli : `XBRL.XBRL_instanceNS` link : `XBRL.XBRL_linkbaseNS`
  xlink : `XBRL.XLINK_NS`
  xl : `XBRL.XBRL_xlNS`
  f : http://xbrl.org/2007/formula
  vl : `XBRL.XBRL_version_2006_NS`
  xs : `XBRL.XML_schemaNS`
  xu : http://www.xmldb.org/xupdate
  --- removed --- xfi : http://www.xbrl.org/2005/function/instance
  xfid : http://www.xbrl.org/2005/function/instance/dimensions xsi : `XBRL.XSI_NS`
  xbrldt : `XBRL.XBRL_dimension_t_NS`
  xbrldi : `XBRL.XBRL_dimension_i_NS`
  ver : `XBRL.XBRL_versionNS`
  ixbrl : `XBRL.XBRL_inlineNS`

  It is possible to dynamically add new prefixes and namespaces to this object
  This class can contain a fallBack class if the prefix cannot be resolved by this class.

  Author:
    Ignacio

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `XBRLNamespaceContext()` Instantiates a new XBRL namespace context.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addNamespace(java.lang.String prefix, java.lang.String namespace)` Adds the namespace.
    `void` | `clear()` Clear.
    `void` | `delNamespace(java.lang.String uri)` Only non static namespaces can be deleted.
    `java.lang.String` | `getNamespaceURI(java.lang.String prefix)`
    `java.lang.String` | `getPrefix(java.lang.String s)`
    `java.util.Iterator<java.lang.String>` | `getPrefixes(java.lang.String s)`
    `static java.lang.String` | `getStaticNamespaceURI(java.lang.String prefix)` Returns the statically assigned namespace URI for the corresponding prefix or null if the namespace URI is not statically assigned.
    `static java.lang.String` | `getStaticPrefix(java.lang.String namespace)` Returns the statically assigned prefix for the corresponding namespace URI or null if the prefix is not statically assigned.
    `java.lang.String` | `getURIForPrefix(java.lang.String prefix, boolean useDefault)`
    `java.util.Iterator<java.lang.String>` | `iteratePrefixes()`
    `void` | `setFallBackNamespaceContext(net.sf.saxon.om.NamespaceResolver fallbackNamespaceContext)` If the namespace is not found in this namespace context try the next one in the chain This method does not work with Saxon NamespaceResolver(s).

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### XBRLNamespaceContext

          public XBRLNamespaceContext()

      Instantiates a new XBRL namespace context.

  - ### Method Detail

    - #### clear

          public void clear()

      Clear.

    - #### addNamespace

          public void addNamespace(java.lang.String prefix,
                          java.lang.String namespace)

      Adds the namespace.
      Parameters:
        `prefix` - the prefix
        `namespace` - the namespace

    - #### delNamespace

          public void delNamespace(java.lang.String uri)

      Only non static namespaces can be deleted.
      Parameters:
        `uri` - the uri

    - #### getNamespaceURI

          public java.lang.String getNamespaceURI(java.lang.String prefix)

      Specified by:
        `getNamespaceURI` in interface `javax.xml.namespace.NamespaceContext`

    - #### getStaticNamespaceURI

          public static java.lang.String getStaticNamespaceURI(java.lang.String prefix)

      Returns the statically assigned namespace URI for the corresponding prefix or null if the namespace URI is not statically assigned.
      Parameters:
        `prefix` - the prefix
      Returns:
        the static namespace uri

    - #### getStaticPrefix

          public static java.lang.String getStaticPrefix(java.lang.String namespace)

      Returns the statically assigned prefix for the corresponding namespace URI or null if the prefix is not statically assigned.
      Parameters:
        `namespace` - the namespace
      Returns:
        the static prefix

    - #### getPrefix

          public java.lang.String getPrefix(java.lang.String s)

      Specified by:
        `getPrefix` in interface `javax.xml.namespace.NamespaceContext`

    - #### getPrefixes

          public java.util.Iterator<java.lang.String> getPrefixes(java.lang.String s)

      Specified by:
        `getPrefixes` in interface `javax.xml.namespace.NamespaceContext`

    - #### getURIForPrefix

          public java.lang.String getURIForPrefix(java.lang.String prefix,
                                         boolean useDefault)

      Specified by:
        `getURIForPrefix` in interface `net.sf.saxon.om.NamespaceResolver`

    - #### iteratePrefixes

          public java.util.Iterator<java.lang.String> iteratePrefixes()

      Specified by:
        `iteratePrefixes` in interface `net.sf.saxon.om.NamespaceResolver`

    - #### setFallBackNamespaceContext

          public void setFallBackNamespaceContext(net.sf.saxon.om.NamespaceResolver fallbackNamespaceContext)

      If the namespace is not found in this namespace context try the next one in the chain This method does not work with Saxon NamespaceResolver(s). Only with NamespaceContext(s)
      Parameters:
        `fallbackNamespaceContext` - NamespaceContext