XML element inside XBRL instance (or the entire XBRL instance itself). This API is immutable, provided the backing element is immutable.
XML element inside XBRL instance (or the entire XBRL instance itself). This API is immutable, provided the backing element is immutable.
The yaidom SubtypeAwareElemApi
and ScopedElemApi
query API is offered.
Also note that the package-private constructor contains redundant data, in order to speed up (yaidom-based) querying, at the expense of (expensive recursive element) creation.
These XBRL instance elements are just an XBRL instance view on the underlying "backing element" tree, and therefore do not know about the taxonomy describing the XBRL instance (other than the href to the DTS entry point). It is not even required that the XBRL instance is schema-valid. Construction of an instance is indeed quite lenient.
As a consequence, this model must recognize facts by only looking at the elements and their ancestry, without knowing anything about the substitution groups of the corresponding concept declarations. Fortunately, the XBRL instance schema (xbrl-instance-2003-12-31.xsd) and the specification of allowed XBRL tuple content are (almost) restrictive enough in order to recognize facts.
It is even possible to easily distinguish between item facts and tuple facts, based on the presence or absence of the contextRef attribute. There is one complication, though, and that is nil item and tuple facts. Unfortunately, concept declarations in taxonomy schemas may have the nillable attribute set to true. This led to some clutter in the inheritance hierarchy for numeric item facts.
Hence, regarding nil facts, the user of the API is responsible for keeping in mind that facts can indeed be nil facts (which facts are easy to filter away).
Another limitation is that without the taxonomy, default dimensions are unknown. Finally, the lack of typing information is a limitation.
Note that the backing element implementation can be any implementation of yaidom query API trait BackingNodes.Elem
.
This class hierarchy depends on Java 8 or later, due to the use of Java 8 time API.
Creation of XbrliElem
objects is designed not to fail, even if the XML element is not an XBRL instance or part thereof.
Of course, after creation many query methods may fail in such cases. It is also possible to use these data classes for
XBRL instances embedded in other XML elements, or only for parts of XBRL instances. As an example of the latter, table layout
models may contain pieces of XBRL context data, such as periods. Their parent elements can be parsed into an XbrliElem
,
thus offering the XBRL instance query API on such XBRL context data.
- Companion
- object
Value members
Concrete methods
Inherited methods
Shorthand for attributeOption(expandedName)
.
Shorthand for attributeOption(expandedName)
.
- Inherited from
- ClarkElemLike
Returns the value of the attribute with the given expanded name, and throws an exception otherwise.
Returns the value of the attribute with the given expanded name, and throws an exception otherwise.
- Inherited from
- ClarkElemLike
Returns the value of the attribute with the given expanded name, if any, wrapped in an Option
.
Returns the value of the attribute with the given expanded name, if any, wrapped in an Option
.
Note that this method can be far more expensive than a custom implementation for a specific element implementation. Therefore this method is non-final and can be overridden.
- Inherited from
- ClarkElemLike
Returns all child elements paired with their path entries.
Returns all child elements paired with their path entries.
This method is final, so more efficient implementations for sub-types are not supported. This implementation is only efficient if finding all child elements as well as computing their resolved names is efficient. That is not the case for DOM wrappers or Scala XML Elem wrappers (due to their expensive Scope computations). On the other hand, those wrapper element implementations are convenient, but not intended for heavy use in production. Hence, this method should typically be fast enough.
- Definition Classes
- ClarkElemLike -> IsNavigable -> IsNavigableApi
- Inherited from
- ClarkElemLike
Returns the first found attribute value of an attribute with the given local name, if any, wrapped in an Option
.
Because of differing namespaces, it is possible that more than one such attribute exists, although this is not often the case.
Returns the first found attribute value of an attribute with the given local name, if any, wrapped in an Option
.
Because of differing namespaces, it is possible that more than one such attribute exists, although this is not often the case.
Note that this method can be far more expensive than a custom implementation for a specific element implementation. Therefore this method is non-final and can be overridden.
- Inherited from
- ClarkElemLike
Finds the child element with the given Path.Entry
(where this element is the root), if any, wrapped in an Option
.
Finds the child element with the given Path.Entry
(where this element is the root), if any, wrapped in an Option
.
This method is final, so more efficient implementations for sub-types are not supported. This implementation is only efficient if finding all child elements as well as computing their resolved names is efficient. That is not the case for DOM wrappers or Scala XML Elem wrappers (due to their expensive Scope computations). On the other hand, those wrapper element implementations are convenient, but not intended for heavy use in production. Hence, this method should typically be fast enough.
- Definition Classes
- ClarkElemLike -> IsNavigable -> IsNavigableApi
- Inherited from
- ClarkElemLike
- Inherited from
- SubtypeAwareElemLike
The local name, that is, the local part of the EName
The local name, that is, the local part of the EName
- Inherited from
- ClarkElemLike