xsd.Schema¶
The xsd.Schema class represents a Schema as a whole schema component as described in the XML Schema
specification. It provides properties to access the different top-level xsd.Component objects and
the xsd.SchemaDocument objects used to compose this xsd.Schema.
-
class
xsd.Schema¶ Proper instances of this class will be created within RaptorXML only, instantiation from script code will throw a
NotImplementedErrorexception.
Class methods¶
-
classmethod
xsd.Schema.create_from_buffer(type cls, buf, *, catalog=None, **kargs)¶ Returns a tuple with an
xsd.Schemaandxml.ErrorLogobject. Constructs a newxsd.Schemaobject after parsing the XML content in the given buffer according to the W3C XML Schema Definition Language (XSD) 1.0 and 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/raptorxmlserver/rxcli_xmlval_xsd.htm for a list of available options. Any errors and warnings reported during the validation can be accessed through the returnedxml.ErrorLogobject.
-
classmethod
xsd.Schema.create_from_url(type cls, url, *, catalog=None, **kargs)¶ Returns a tuple with an
xsd.Schemaandxml.ErrorLogobject. Constructs a newxsd.Schemaobject after parsing the XML content retrieved from the given url according to the W3C XML Schema Definition Language (XSD) 1.0 and 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/raptorxmlserver/rxcli_xmlval_xsd.htm for a list of available options. Any errors and warnings reported during the validation can be accessed through the returnedxml.ErrorLogobject.
-
classmethod
xsd.Schema.validate_buffer(type cls, buf, *, catalog=None, **kargs)¶ Validates the XML Schema document from the given buffer buf according to the W3C XML Schema Definition Language (XSD) 1.0 and 1.1 specification and returns
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_xsd.htm for a list of available options. Any errors and warnings reported during the validation can be accessed through the returnedxml.ErrorLogobject.
-
classmethod
xsd.Schema.validate_url(type cls, url, *, catalog=None, **kargs)¶ Validates the XML Schema document at the given url according to the W3C XML Schema Definition Language (XSD) 1.0 and 1.1 specification and returns
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_xsd.htm for a list of available options. Any errors and warnings reported during the validation can be accessed through the returnedxml.ErrorLogobject.
Attributes¶
-
xsd.Schema.annotations¶ Returns an iterator of
xsd.Annotationcomponents for thisxsd.Schema.
-
xsd.Schema.attribute_declarations¶ Returns an iterator of all top-level
xsd.AttributeDeclarationcomponents.
-
xsd.Schema.attribute_group_definitions¶ Returns an iterator of all top-level
xsd.AttributeGroupDefinitioncomponents.
-
xsd.Schema.documents¶ Returns an iterator of all
xsd.SchemaDocumentobjects part of thisxsd.Schema.
-
xsd.Schema.element_declarations¶ Returns an iterator of all top-level
xsd.ElementDeclarationcomponents.
-
xsd.Schema.identity_constraint_definitions¶ Returns an iterator of all
xsd.IdentityConstraintDefinitioncomponents.
-
xsd.Schema.model_group_definitions¶ Returns an iterator of all top-level
xsd.ModelGroupDefinitioncomponents.
-
xsd.Schema.notation_declarations¶ Returns an iterator of all top-level
xsd.NotationDeclarationcomponents.
-
xsd.Schema.type_definitions¶ Returns an iterator of all top-level
xsd.SimpleTypeDefinitionandxsd.ComplexTypeDefinitioncomponents.
Methods¶
-
xsd.Schema.find_document(uri)¶ Returns the
xsd.SchemaDocumentwith the given URI, or None if no suchxsd.SchemaDocumentis part of thexsd.Schema.
-
xsd.Schema.resolve_attribute_declaration(name)¶ Returns the top-level
xsd.AttributeDeclarationwith the given name. Name may be either axml.QNameor a tuple of local name and optional namespace name.
-
xsd.Schema.resolve_attribute_group_definition(name)¶ Returns the top-level
xsd.AttributeGroupDefinitionwith the given name. Name may be either axml.QNameor a tuple of local name and optional namespace name.
-
xsd.Schema.resolve_element_declaration(name)¶ Returns the top-level
xsd.ElementDeclarationwith the given name. Name may be either axml.QNameor a tuple of local name and optional namespace name.
-
xsd.Schema.resolve_identity_constraint_definition(name)¶ Returns the
xsd.IdentityConstraintDefinitionwith the given name. Name may be either axml.QNameor a tuple of local name and optional namespace name.
-
xsd.Schema.resolve_model_group_definition(name)¶ Returns the top-level
xsd.ModelGroupDefinitionwith the given name. Name may be either axml.QNameor a tuple of local name and optional namespace name.
-
xsd.Schema.resolve_notation_declaration(name)¶ Returns the top-level
xsd.NotationDeclarationwith the given name. Name may be either axml.QNameor a tuple of local name and optional namespace name.
-
xsd.Schema.resolve_type_definition(name)¶ Returns the top-level
xsd.SimpleTypeDefinitionorxsd.ComplexTypeDefinitionwith the given name. Name may be either axml.QNameor a tuple of local name and optional namespace name.
-
xsd.Schema.sample_xml(name=None, SampleXMLGeneratorOptions options=None)¶ Generates a XML sample for this schema. name specifies the name of the root element. If no name is specified then the method tries to autodetect a suitable 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__