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.



[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.


[PSVI] Returns the governing xsd.AttributeDeclaration of this xml.AttributeInformationItem or None if no such declaration is known.


Returns an xml.Document object representing the XML instance file containing this information item.


Returns an xml.InformationItem object representing the first child information item. Returns None if this information item does not have any children.


Returns the local part of the attribute name. This does not include any namespace prefix or following colon.


[PSVI] Returns the validating xsd.SimpleTypeDefinition of the schema_actual_value or None if the governing xsd.SimpleTypeDefinition has variety != xsd.SimpleTypeVariety.UNION.


Returns the namespace name, if any, of the attribute. Otherwise, this property returns None.


Returns an xml.AttributeInformationItem object representing the next attribute in document order. Returns None if this is the last attribute.


Returns the normalized attribute value.


Returns the xml.ElementInformationItem which contains this xml.AttributeInformationItem in its attributes property.


Returns the namespace prefix part of the attribute name. If the name is unprefixed, this property returns None.


Returns an xml.AttributeInformationItem object representing the previous attribute in document order. Returns None if this is the first attribute.


Returns an xml.QName object representing the expended name of the XML attribute.


[PSVI] Returns the actual value corresponding to the schema_normalized_value or None if there is no schema_normalized_value.


[PSVI] Returns the schema normalized value of the xml.AttributeInformationItem as validated or None if no validation was attempted.


[PSVI] Returns the schema specified property of the xml.AttributeInformationItem.

Possible values are:


Returns the source xml.AttributeInformationItem in case that the Infoset was constructed by an Inline XBRL transformation.


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.


[PSVI] Returns the governing xsd.SimpleTypeDefinition of this xml.AttributeInformationItem or None if no such definition is known.


[PSVI] Returns the validation attempted state of the xml.AttributeInformationItem. Possible values are:


[PSVI] Returns the schema-validity of this xml.AttributeInforamtionItem. Possible values are:



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).


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 the xml.DocumentInformationItem (see xml.DocumentInformationItem.build_element_position_cache()) and in O( n ) otherwise (d is the depth of the owner_element xml.ElementInformationItem and n is the number of xml.ElementInformationItem objects in the document). If you need the XPaths for many elements/attributes invoke xml.DocumentInformationItem.build_element_position_cache() first.

Special methods

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