xml.AttributeInformationItem
¶
The xml.AttributeInformationItem
class represents an XML attribute and exposes the properties of the
Attribute Information Item defined in the
XML Infoset specification as well as the properties of the
post-schema-validation infoset for attributes as
specified in the XML Schema specification.
Note: Namespace binding attributes are represented by the xml.NSAttributeInformationItem
class and
are not covered by this xml.AttributeInformationItem
class.
Base class: xml.InformationItem
- class xml.AttributeInformationItem¶
Proper instances of this class will be created within RaptorXML only, instantiation from script code will throw a
NotImplementedError
exception.
Attributes¶
- xml.AttributeInformationItem.attribute_attribution¶
[PSVI] During validation
xml.AttributeInformationItem
objects are associated with xsd.AttributeUse or xsd.AnyAttribute schema components. This property returns that component or None if no validation was attempted.
- xml.AttributeInformationItem.attribute_declaration¶
[PSVI] Returns the governing xsd.AttributeDeclaration of this
xml.AttributeInformationItem
or None if no such declaration is known.
- xml.InformationItem.document
Returns an
xml.Document
object representing the XML instance file containing this information item.
- xml.InformationItem.first_child
Returns an
xml.InformationItem
object representing the first child information item. Returns None if this information item does not have any children.
- xml.AttributeInformationItem.local_name¶
Returns the local part of the attribute name. This does not include any namespace prefix or following colon.
- xml.AttributeInformationItem.member_type_definition¶
[PSVI] Returns the validating xsd.SimpleTypeDefinition of the schema_actual_value or None if the governing xsd.SimpleTypeDefinition has variety != xsd.SimpleTypeVariety.UNION.
- xml.AttributeInformationItem.namespace_name¶
Returns the namespace name, if any, of the attribute. Otherwise, this property returns None.
- xml.AttributeInformationItem.next¶
Returns an
xml.AttributeInformationItem
object representing the next attribute in document order. Returns None if this is the last attribute.
- xml.AttributeInformationItem.normalized_value¶
Returns the normalized attribute value.
- xml.AttributeInformationItem.owner_element¶
Returns the
xml.ElementInformationItem
which contains thisxml.AttributeInformationItem
in its attributes property.
- xml.AttributeInformationItem.prefix¶
Returns the namespace prefix part of the attribute name. If the name is unprefixed, this property returns None.
- xml.AttributeInformationItem.prev¶
Returns an
xml.AttributeInformationItem
object representing the previous attribute in document order. Returns None if this is the first attribute.
- xml.AttributeInformationItem.qname¶
Returns an
xml.QName
object representing the expended name of the XML attribute.
- xml.AttributeInformationItem.schema_actual_value¶
[PSVI] Returns the actual value corresponding to the schema_normalized_value or None if there is no schema_normalized_value.
- xml.AttributeInformationItem.schema_normalized_value¶
[PSVI] Returns the schema normalized value of the
xml.AttributeInformationItem
as validated or None if no validation was attempted.
- xml.AttributeInformationItem.schema_specified¶
[PSVI] Returns the schema specified property of the
xml.AttributeInformationItem
.Possible values are:
xml.SchemaSpecified.NONE
if no schema validity was assessed for this attribute.xml.SchemaSpecified.INFOSET
if thexml.AttributeInformationItem
originates from an attribute in the instance.xml.SchemaSpecified.SCHEMA
if thexml.AttributeInformationItem
originates from a value constraint in the schema.
- xml.AttributeInformationItem.source_attribute¶
Returns the source
xml.AttributeInformationItem
in case that the Infoset was constructed by an Inline XBRL transformation.
- xml.AttributeInformationItem.specified¶
Returns True if this attribute was specified in the start-tag of its element and False if it was defaulted from the DTD or W3C Schema.
- xml.AttributeInformationItem.type_definition¶
[PSVI] Returns the governing xsd.SimpleTypeDefinition of this
xml.AttributeInformationItem
or None if no such definition is known.
- xml.AttributeInformationItem.validation_attempted¶
[PSVI] Returns the validation attempted state of the
xml.AttributeInformationItem
. Possible values are:ValidationAttempted.FULL if the
xml.AttributeInformationItem
was strictly assessed.ValidationAttempted.NONE if the
xml.AttributeInformationItem
was not strictly assessed.
- xml.AttributeInformationItem.validity¶
[PSVI] Returns the schema-validity of this xml.AttributeInforamtionItem. Possible values are:
Validity.VALID if the
xml.AttributeInformationItem
was strictly assessed and it was locally valid.Validity.INVALID if the
xml.AttributeInformationItem
was strictly assessed and it was not locally valid.Validity.NOTKNOWN if the
xml.AttributeInformationItem
was not strictly assessed.
Methods¶
- xml.InformationItem.xlocation_url(item_value=False)
Returns proprietary Altova URL to this Item. If item_value is True the URL references the value content of an Element or Attribute item (is ignored for other kinds).
- xml.AttributeInformationItem.xpath()¶
Returns an XPath to this
xml.AttributeInformationItem
in the form “/*[1]/*[4]/@attr”. The runtime of this method is in O( d ) if element position infos are cached on thexml.DocumentInformationItem
(seexml.DocumentInformationItem.build_element_position_cache()
) and in O( n ) otherwise (d is the depth of the owner_elementxml.ElementInformationItem
and n is the number ofxml.ElementInformationItem
objects in the document). If you need the XPaths for many elements/attributes invokexml.DocumentInformationItem.build_element_position_cache()
first.
Special methods¶
__bool__, __eq__, __ge__, __gt__, __le__, __lt__, __ne__