xsd.SchemaDocument¶
The xsd.SchemaDocument class represents a single schema document, part of the Schema as a whole schema component (xsd.Schema).
Base class: xml.Document
-
class
xsd.SchemaDocument¶ Proper instances of this class will be created within RaptorXML only, instantiation from script code will throw a
NotImplementedErrorexception.
Attributes¶
-
xml.Document.document Returns the
xml.DocumentInformationItemrepresenting this document.
-
xml.Document.document_element Returns the
xml.ElementInformationItemrepresenting the document information item for this document.
-
xsd.SchemaDocument.schema¶ Returns an
xsd.SchemaElementobject which represents the <xs:schema> XML document element.
-
xsd.SchemaDocument.schema_element¶ [DEPRECATED] This property has been deprecated, please use the schema property instead.
-
xml.Document.schema_location_attributes Returns an iterator of
xml.AttributeInformationItemobjects objects which represent all xsi:schemaLocation and xsi:noNamespaceSchemaLocation attributes in this instance.
-
xml.Document.source_document Returns the source
xml.Documentin case that the document was constructed by an Inline XBRL transformation.
-
xml.Document.unmapped_uri Attempts to return the original URI of the document before any catalog mappings were applied.
-
xml.Document.uri Returns the URI of the document (after any catalog mappings) that was used to actually open the document and read its content.
Methods¶
-
xml.Document.find_element(id) Returns an
xml.ElementInformationItemobject which represent the element with the given ID or at the given XPointer location. Returns None if no appropriate element can be found.
-
xml.Document.serialize(pretty_print=True, add_unspecified_attributes=False) Returns a string with the serialized document. Setting the option pretty_print will insert appropriate indendation and newlines after each XML element. Setting the option add_unspecified_attributes will add any missing attributes that have a default value in the DTD/XSD Schema.
Special methods¶
__bool__, __eq__, __ge__, __gt__, __le__, __lt__, __ne__