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
NotImplementedErrorexception.
Attributes¶
-
xml.AttributeInformationItem.attribute_attribution¶ [PSVI] During validation
xml.AttributeInformationItemobjects are associated withxsd.AttributeUseorxsd.AnyAttributeschema components. This property returns that component or None if no validation was attempted.
-
xml.AttributeInformationItem.attribute_declaration¶ [PSVI] Returns the governing
xsd.AttributeDeclarationof thisxml.AttributeInformationItemor None if no such declaration is known.
-
xml.InformationItem.document Returns an
xml.Documentobject representing the XML instance file containing this information item.
-
xml.InformationItem.first_child Returns an
xml.InformationItemobject 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.SimpleTypeDefinitionof the schema_actual_value or None if the governingxsd.SimpleTypeDefinitionhas 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.AttributeInformationItemobject 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.ElementInformationItemwhich contains thisxml.AttributeInformationItemin 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.AttributeInformationItemobject representing the previous attribute in document order. Returns None if this is the first attribute.
-
xml.AttributeInformationItem.qname¶ Returns an
xml.QNameobject 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.AttributeInformationItemas 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.NONEif no schema validity was assessed for this attribute.xml.SchemaSpecified.INFOSETif thexml.AttributeInformationItemoriginates from an attribute in the instance.xml.SchemaSpecified.SCHEMAif thexml.AttributeInformationItemoriginates from a value constraint in the schema.
-
xml.AttributeInformationItem.source_attribute¶ Returns the source
xml.AttributeInformationItemin 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.SimpleTypeDefinitionof thisxml.AttributeInformationItemor 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.AttributeInformationItemwas strictly assessed.ValidationAttempted.NONE if the
xml.AttributeInformationItemwas not strictly assessed.
-
xml.AttributeInformationItem.validity¶ [PSVI] Returns the schema-validity of this xml.AttributeInforamtionItem. Possible values are:
Validity.VALID if the
xml.AttributeInformationItemwas strictly assessed and it was locally valid.Validity.INVALID if the
xml.AttributeInformationItemwas strictly assessed and it was not locally valid.Validity.NOTKNOWN if the
xml.AttributeInformationItemwas 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.AttributeInformationItemin 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.ElementInformationItemand n is the number ofxml.ElementInformationItemobjects 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__