public class XBRLNamespaceContext
extends java.lang.Object
implements javax.xml.namespace.NamespaceContext, net.sf.saxon.om.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.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
rsInternalPrefix
Prefix to be added to standard prefixes to allow RS code to refer to namespaces using own own prefixes and avoid collisions with prefixes in incoming files.
|
Constructor and Description |
---|
XBRLNamespaceContext()
Instantiates a new XBRL namespace context.
|
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.
|
static java.lang.String |
fixRemoveRSPrefix(java.lang.String prefix)
The RS API uses internally a set of static prefixes that identifies
the namespaces defined in the specifications.
|
java.lang.String |
getNamespaceURI(java.lang.String prefix)
Gets the namespace URI.
|
java.lang.String |
getPrefix(java.lang.String s)
Gets the prefix.
|
java.util.Iterator<java.lang.String> |
getPrefixes(java.lang.String s)
Gets the prefixes.
|
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)
Gets the URI for prefix.
|
java.util.Iterator<java.lang.String> |
iteratePrefixes()
Iterate prefixes.
|
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).
|
public static final java.lang.String rsInternalPrefix
public XBRLNamespaceContext()
public void clear()
public void addNamespace(java.lang.String prefix, java.lang.String namespace)
prefix
- the prefixnamespace
- the namespacepublic void delNamespace(java.lang.String uri)
uri
- the uripublic java.lang.String getNamespaceURI(java.lang.String prefix)
getNamespaceURI
in interface javax.xml.namespace.NamespaceContext
prefix
- the prefixpublic static java.lang.String getStaticNamespaceURI(java.lang.String prefix)
prefix
- the prefixpublic static java.lang.String getStaticPrefix(java.lang.String namespace)
namespace
- the namespacepublic static java.lang.String fixRemoveRSPrefix(java.lang.String prefix)
prefix
- the prefix to check to remove the custom prefixpublic java.lang.String getPrefix(java.lang.String s)
getPrefix
in interface javax.xml.namespace.NamespaceContext
s
- the spublic java.util.Iterator<java.lang.String> getPrefixes(java.lang.String s)
getPrefixes
in interface javax.xml.namespace.NamespaceContext
s
- the spublic java.lang.String getURIForPrefix(java.lang.String prefix, boolean useDefault)
getURIForPrefix
in interface net.sf.saxon.om.NamespaceResolver
prefix
- the prefixuseDefault
- the use defaultpublic java.util.Iterator<java.lang.String> iteratePrefixes()
iteratePrefixes
in interface net.sf.saxon.om.NamespaceResolver
public void setFallBackNamespaceContext(net.sf.saxon.om.NamespaceResolver fallbackNamespaceContext)
fallbackNamespaceContext
- NamespaceContextCopyright 2006-2015 Reporting Standard S.L., C/ Torrecilla del Puerto 1, 28043, Madrid, Espaņa