xml.dtd.DTD¶
An xml.dtd.DTD class represents the XML Document Type Definition.
-
class
xml.dtd.DTD¶ Proper instances of this class will be created within RaptorXML only, instantiation from script code will throw a
NotImplementedErrorexception.
Class methods¶
-
classmethod
xml.dtd.DTD.create_from_buffer(type cls, buf, *, catalog=None, **kargs)¶ Returns a tuple with an
xml.dtd.DTDandxml.ErrorLogobject. Constructs a newxml.dtd.DTDobject after parsing the DTD content in the given buffer according to the XML 1.0 or XML 1.1 specification. Optional user XML catalogs can be specified with the catalog argument. Other validation options can be specified using additional kargs. Please consult the RaptorXML CLI documentation http://manual.altova.com/RaptorXML/raptorxmlxbrlserver/rxcli_xmlval_dtd.htm for a list of available options. Any errors and warnings reported during the validation can be accessed through the returnedxml.ErrorLogobject.
-
classmethod
xml.dtd.DTD.create_from_url(type cls, url, *, catalog=None, **kargs)¶ Returns a tuple with an
xml.dtd.DTDandxml.ErrorLogobject. Constructs a newxml.dtd.DTDobject after parsing the DTD content retrieved from the given url according to the XML 1.0 or XML 1.1 specification. Optional user XML catalogs can be specified with the catalog argument. Other validation options can be specified using additional kargs. Please consult the RaptorXML CLI documentation http://manual.altova.com/RaptorXML/raptorxmlxbrlserver/rxcli_xmlval_dtd.htm for a list of available options. Any errors and warnings reported during the validation can be accessed through the returnedxml.ErrorLogobject.
-
classmethod
xml.dtd.DTD.is_wellformed_buffer(type cls, buf, *, catalog=None, **kargs)¶ Checks the buffer buf containing a DTD document according to the XML 1.0 or XML 1.1 specification for wellformedness and returns an
xml.ErrorLogobject with the results. Optional user XML catalogs can be specified with the catalog argument. Other validation options can be specified using additional kargs. Please consult the RaptorXML CLI documentation http://manual.altova.com/RaptorXML/raptorxmlxbrlserver/rxcli_wf_dtd.htm for a list of available options. Any errors and warnings reported during the validation can be accessed through the returnedxml.ErrorLogobject.
-
classmethod
xml.dtd.DTD.is_wellformed_url(type cls, url, *, catalog=None, **kargs)¶ Checks the DTD document at the given url according to the XML 1.0 or XML 1.1 specification for wellformedness and returns an
xml.ErrorLogobject with the results. Optional user XML catalogs can be specified with the catalog argument. Other validation options can be specified using additional kargs. Please consult the RaptorXML CLI documentation http://manual.altova.com/RaptorXML/raptorxmlxbrlserver/rxcli_wf_dtd.htm for a list of available options. Any errors and warnings reported during the validation can be accessed through the returnedxml.ErrorLogobject.
-
classmethod
xml.dtd.DTD.validate_buffer(type cls, buf, *, catalog=None, **kargs)¶ Validates the buffer buf containing a DTD document according to the XML 1.0 or XML 1.1 specification and returns an
xml.ErrorLogobject with the results. Optional user XML catalogs can be specified with the catalog argument. Other validation options can be specified using additional kargs. Please consult the RaptorXML CLI documentation http://manual.altova.com/RaptorXML/raptorxmlxbrlserver/rxcli_xmlval_dtd.htm for a list of available options. Any errors and warnings reported during the validation can be accessed through the returnedxml.ErrorLogobject.
-
classmethod
xml.dtd.DTD.validate_url(type cls, url, *, catalog=None, **kargs)¶ Validates the DTD document at the given url according to the XML 1.0 or XML 1.1 specification and returns an
xml.ErrorLogobject with the results. Optional user XML catalogs can be specified with the catalog argument. Other validation options can be specified using additional kargs. Please consult the RaptorXML CLI documentation http://manual.altova.com/RaptorXML/raptorxmlxbrlserver/rxcli_xmlval_dtd.htm for a list of available options. Any errors and warnings reported during the validation can be accessed through the returnedxml.ErrorLogobject.
Attributes¶
-
xml.dtd.DTD.attribute_list_declarations¶ Returns an iterator of
xml.dtd.AttlistDeclobjects which represent the attribute list declarations in the DTD.
-
xml.dtd.DTD.doctype_name¶ Returns the name in the document type declaration specifying the root element type.
-
xml.dtd.DTD.element_declarations¶ Returns an iterator of
xml.dtd.ElementDeclobjects which represent the element declarations in the DTD.
-
xml.dtd.DTD.entity_declarations¶ Returns an iterator of
xml.dtd.EntityDeclobjects which represent the entity declarations in the DTD.
-
xml.dtd.DTD.external_subset_uri¶ Returns the URI of the external DTD subset.
-
xml.dtd.DTD.general_entity_declarations¶ Returns an iterator of
xml.dtd.GEDeclobjects which represent the general entity declarations in the DTD.
-
xml.dtd.DTD.notation_declarations¶ Returns an iterator of
xml.dtd.NotationDeclobjects which represent the notation declarations in the DTD.
-
xml.dtd.DTD.parameter_entity_declarations¶ Returns an iterator of
xml.dtd.PEDeclobjects which represent the parameter entity declarations in the DTD.
Methods¶
-
xml.dtd.DTD.find_attribute_list_declaration(name)¶ Returns an
xml.dtd.AttlistDeclobject which represents the attribute list declaration with the given name, or None if no attribute list declaration was found.
-
xml.dtd.DTD.find_element_declaration(name)¶ Returns an
xml.dtd.ElementDeclobject which represents the element declaration with the given name, or None if no element declaration was found.
-
xml.dtd.DTD.find_entity_declarations(name)¶ Returns an
xml.dtd.EntityDeclobject which represents the entity declaration with the given name, or None if no entity declaration was found.
-
xml.dtd.DTD.find_general_entity_declarations(name)¶ Returns an
xml.dtd.GEDeclobject which represents the general entity declaration with the given name, or None if no general entity declaration was found.
-
xml.dtd.DTD.find_notation_declaration(name)¶ Returns an
xml.dtd.NotationDeclobject which represents the notation declaration with the given name, or None if no notation declaration was found.
-
xml.dtd.DTD.find_parameter_entity_declarations(name)¶ Returns an
xml.dtd.PEDeclobject which represents the parameter entity declaration with the given name, or None if no parameter entity declaration was found.
-
xml.dtd.DTD.sample_xml(name, SampleXMLGeneratorOptions options=None)¶ Generates a XML sample for this DTD. name specifies the name of the root element. A
xml.SampleXMLGeneratorOptionsinstance can be used to configure the generator behavior. If no options are specified then a defaultxml.SampleXMLGeneratorOptionsinstance is used.
Special methods¶
__bool__, __eq__, __ge__, __gt__, __le__, __lt__, __ne__