xbrl.Unit

An xbrl.Unit class represents an XBRL unit in the XBRL instance.

Nested classes: xbrl.Unit.Measure

class xbrl.Unit

Proper instances of this class will be created within RaptorXML only, instantiation from script code will throw a NotImplementedError exception.

Attributes

xbrl.Unit.aspect_value

Returns an xbrl.UnitAspectValue object representing the unit aspect value.

xbrl.Unit.denominator_measures

Returns an iterator of xbrl.Unit.Measure objects which represent the <xbrli:measure> child elements of the unit’s denominator element.

xbrl.Unit.element

Returns an xml.ElementInformationItem object which represents the <xbrli:unit> element information item.

xbrl.Unit.id

Returns the value of the ‘id’ attribute as a string, or None if the XML element information item doesn’t have an ‘id’ attribute.

xbrl.Unit.numerator_measures

Returns an iterator of xbrl.Unit.Measure objects which represent the <xbrli:measure> child elements of the unit or the unit’s numerator element.

Methods

xbrl.Unit.xpointer(bForceElementScheme=False)

Returns an URI with XPointer fragment that points to this XML element as a string. If the XML element information item has an id attribute, a shorthand pointer with the id attribute value will be generated, otherwise the XPointer element scheme will be used. Set force_element_scheme to True to prevent generation of shorthand pointers.

Special methods

__bool__, __eq__, __ge__, __gt__, __le__, __lt__, __ne__