MCPcopy Create free account

hub / github.com/sissaschool/xmlschema / functions

Functions2,466 in github.com/sissaschool/xmlschema

↓ 367 callersMethodis_valid
Like :meth:`validate` except it does not raise an exception on validation error but returns ``True`` if the XML data object is valid,
xmlschema/dataobjects.py:271
↓ 271 callersMethodparse_error
Helper method for registering parse errors. Does nothing if validation mode is 'skip'. Il validation mode is 'lax' collects the error
xmlschema/validators/xsdbase.py:183
↓ 260 callersMethoddecode
Decode the XML document to a nested Python dictionary. :param kwargs: options for the decode/to_dict method of the schema instance.
xmlschema/documents.py:617
↓ 221 callersMethodcasepath
(cls, relative_path)
tests/test_converters.py:61
↓ 148 callersMethodencode
Encodes the data object to XML. :param validation: the validation mode. Can be 'lax', 'strict' or 'skip. :param kwargs: opti
xmlschema/dataobjects.py:308
↓ 136 callersMethodcheck_schema
Create a schema for a test case. :param source: A relative path or a root Element or a portion of schema for a template. :pa
xmlschema/testing/_test_case_classes.py:155
↓ 120 callersMethodcheck_encode
(self, xsd_component, data, expected, **kwargs)
tests/validation/test_encoding.py:39
↓ 105 callersMethodupdate
(self, other: 'StagedMap[CT]')
xmlschema/validators/builders.py:413
↓ 98 callersMethodget
(self, name)
xmlschema/extras/wsdl.py:84
↓ 98 callersMethodvalidate
(cls, instance: Any)
xmlschema/arguments.py:459
↓ 96 callersMethodvalidation_error
Helper method for collecting or raising validation errors. :param validation: :param validator: the XSD validator related wi
xmlschema/validators/validation.py:238
↓ 95 callersFunctionetree_elements_assert_equal
Tests the equality of two XML Element trees. :param elem: the master Element tree, reference for namespace mapping. :param other: the ot
xmlschema/testing/_helpers.py:38
↓ 92 callersFunctionnormalize_url
Returns a normalized URL eventually joining it to a base URL if it's a relative path. Path names are converted to 'file' scheme URLs and unsa
xmlschema/utils/urls.py:205
↓ 80 callersMethodparse
Set and parse the component Element.
xmlschema/validators/xsdbase.py:383
↓ 71 callersFunctionetree_tostring
Serialize an Element tree to a string. :param elem: the Element instance. :param namespaces: is an optional mapping from namespace prefi
xmlschema/utils/etree.py:203
↓ 70 callersMethodcheck_advance_true
Advances a model with a match condition and checks the expected error list or exception. :param model: an ModelGroupVisitor instance
tests/validators/test_models.py:62
↓ 65 callersMethodcopy
(self)
xmlschema/validators/builders.py:679
↓ 60 callersMethodcheck_advance_false
Advances a model with a no-match condition and checks the expected error list or exception. :param model: an ModelGroupVisit
tests/validators/test_models.py:75
↓ 59 callersMethodget_facet
(self, tag: str)
xmlschema/validators/simple_types.py:599
↓ 54 callersMethodas_uri
(self)
xmlschema/utils/paths.py:119
↓ 48 callersMethodget_schema
Returns a new schema instance from schema settings. Optional keyword arguments must be options for schema initialization and can be p
xmlschema/settings.py:322
↓ 45 callersMethodget
Gets a data element attribute.
xmlschema/dataobjects.py:148
↓ 43 callersMethoditer
Creates an iterator for the data element and its subelements. If tag is not `None` or '*', only data elements whose matches tag are r
xmlschema/dataobjects.py:206
↓ 43 callersMethodparse_error
(self, message)
xmlschema/extras/wsdl.py:576
↓ 42 callersMethodparse_error
(self, error: Union[str, Exception], elem: Optional[ElementType] = None,
xmlschema/validators/attributes.py:624
↓ 41 callersMethodgetroot
Get the root element of the XML document.
xmlschema/documents.py:597
↓ 40 callersFunctionis_etree_element
A validator for ElementTree elements that excludes XsdElement objects.
xmlschema/utils/etree.py:22
↓ 40 callersFunctionrun_xmlschema_tests
(target=None, args=None)
xmlschema/testing/_factory.py:104
↓ 39 callersMethodreplace
Creates a new converter instance from the existing, replacing options provided with keyword arguments.
xmlschema/converters/base.py:203
↓ 36 callersFunctionget_namespace
Returns the namespace URI associated with a QName in extended form or a local name. If the argument is not conformant to QName format returns
xmlschema/utils/qnames.py:20
↓ 35 callersMethodunmap_qname
(self, qname: str, name_table: Container[str | None] | None = None, xm
xmlschema/converters/gdata.py:56
↓ 34 callersMethodadvance
Generator function for advance to the next element. Yields tuples with particles information when occurrence violation is found.
xmlschema/validators/models.py:267
↓ 34 callersMethodhas_occurs_restriction
( self, other: Union[ModelParticleType, ParticleMixin, 'OccursCalculator'])
xmlschema/validators/groups.py:280
↓ 34 callersMethodread
(self, n: int = ...)
xmlschema/utils/protocols.py:20
↓ 33 callersMethodget_nsmap
Returns the namespace map (nsmap) of the element. Returns `None` if no nsmap is found for the element. Lazy resources have only the n
xmlschema/resources/xml_loader.py:175
↓ 33 callersFunctionget_prefixed_qname
Get the prefixed form of a QName, using a namespace map. :param qname: an extended QName or a local name or a prefixed QName. :param nam
xmlschema/utils/qnames.py:96
↓ 33 callersMethodopen
Returns an opened resource reader object for the instance URL. If the source attribute is a seekable file-like object rewind the sour
xmlschema/resources/xml_resource.py:431
↓ 32 callersMethodset_xmlns_context
Set the right context for the XML data and its level, updating the namespace map if necessary. Returns the xmlns declarations of the
xmlschema/namespaces.py:185
↓ 32 callersMethodto_json
Converts loaded XML data to a JSON string or file. :param fp: can be a :meth:`write()` supporting file-like object. :param j
xmlschema/documents.py:631
↓ 31 callersMethodclear
(self)
xmlschema/validators/builders.py:409
↓ 31 callersFunctionsplit_path
Splits a path expression to a sequence of chunks that put in evidence path steps, predicates and other parts that can be useful for checking
xmlschema/xpath/selectors.py:42
↓ 30 callersFunctionlocal_name
Return the local part of an expanded QName or a prefixed name. If the name is `None` or empty returns the *name* argument. :param qname:
xmlschema/utils/qnames.py:74
↓ 29 callersMethodbuild
(self)
xmlschema/validators/groups.py:631
↓ 28 callersMethodcheck_complex_restriction
(self, base, restriction, expected=None, **kwargs)
tests/validators/test_complex_types.py:25
↓ 28 callersFunctionget_context
Get the XML document validation/decode context. :return: an XMLResource instance and a schema instance.
xmlschema/documents.py:46
↓ 28 callersMethodwrite
Serialize an XML resource to a file. Cannot be used with lazy resources.
xmlschema/documents.py:675
↓ 27 callersMethodclear
(self)
tests/validators/test_groups.py:39
↓ 27 callersFunctionis_unc_path
Returns `True` if the provided path is a UNC path, `False` otherwise. Based on the capabilities of `PureWindowsPath` of the Python release.
xmlschema/utils/paths.py:24
↓ 26 callersMethod_parse_child_component
(self, elem: ElementType, strict: bool = True)
xmlschema/validators/xsdbase.py:443
↓ 26 callersFunctioncount_digits
Counts the digits of a number. :param number: an int or a float or a Decimal or a string representing a number. :return: a couple with t
xmlschema/utils/decoding.py:32
↓ 25 callersMethodcheck_decode
(self, xsd_component, data, expected, **kwargs)
tests/validation/test_decoding.py:558
↓ 25 callersMethoddecode
Decodes XML data. Takes the same arguments of the method :meth:`iter_decode`.
xmlschema/validators/schemas.py:1615
↓ 25 callersMethodis_empty
Returns `True` if the instance has an empty content, `False` otherwise.
xmlschema/validators/xsdbase.py:795
↓ 25 callersMethodresolve_qname
QName resolution for a schema instance. :param qname: a string in xs:QName format. :param namespace_imported: if this argume
xmlschema/validators/schemas.py:1160
↓ 24 callersMethodis_lazy
Returns `True` if the XML resource is lazy.
xmlschema/resources/xml_resource.py:252
↓ 23 callersMethodfind
Finds the first data element matching the path. :param path: an XPath expression that considers the data element as the root.
xmlschema/dataobjects.py:382
↓ 23 callersFunctionget_qname
Returns an expanded QName from URI and local part. If any argument has boolean value `False` or if the name is already an expanded QName, ret
xmlschema/utils/qnames.py:53
↓ 23 callersMethodis_restriction
(self)
xmlschema/validators/xsdbase.py:840
↓ 23 callersMethoditer
XML resource tree iterator. If tag is not None or '*', only elements whose tag equals tag are returned from the iterator. In a lazy r
xmlschema/resources/xml_resource.py:536
↓ 23 callersMethoditerfind
Creates and iterator for all XSD subelements matching the path. :param path: an XPath expression that considers the XSD component as
xmlschema/xpath/mixin.py:125
↓ 22 callersMethodcheck_url
(self, url, expected)
tests/test_locations.py:120
↓ 22 callersMethodfindall
Finds all data elements matching the path. :param path: an XPath expression that considers the data element as the root. :pa
xmlschema/dataobjects.py:396
↓ 22 callersMethodload
Loads the XML text from the data source. If the data source is an Element the source XML text can't be retrieved.
xmlschema/resources/xml_resource.py:512
↓ 22 callersMethodmap_qname
Converts an extended QName to the prefixed format. Only registered namespaces are mapped. :param qname: a QName in extended
xmlschema/namespaces.py:265
↓ 21 callersMethodis_derived
Returns `True` if the instance is derived from *other*, `False` otherwise. The optional argument derivation can be a string containin
xmlschema/validators/xsdbase.py:829
↓ 21 callersFunctionis_local_url
(obj: object)
xmlschema/utils/urls.py:98
↓ 21 callersMethoditer_model
A generator function iterating elements and groups of a model group. Skips pointless groups, iterating deeper through them. R
xmlschema/validators/groups.py:324
↓ 21 callersFunctionraw_encode_value
Encodes a simple value to XML.
xmlschema/utils/decoding.py:72
↓ 21 callersFunctionupdate_namespaces
Update a namespace map without overwriting existing declarations. If a duplicate prefix is encountered in a xmlns declaration, and this i
xmlschema/utils/qnames.py:157
↓ 20 callersMethodis_matching
(self, name: Optional[str], default_namespace: Optional[str] = None)
xmlschema/xpath/mixin.py:90
↓ 19 callersMethodcheck_decode_encode
(self, root, converter=None, etree_element_class=None, **kwargs)
xmlschema/testing/_builders.py:283
↓ 19 callersMethodcheck_validity
(self, xsd_component, data, expected, use_defaults=True)
tests/validation/test_validation.py:176
↓ 19 callersMethodcreate_empty_content_group
Creates an empty local child content group for a complex type or a group.
xmlschema/validators/builders.py:235
↓ 19 callersFunctionis_drive_path
Returns `True` if the provided path starts with a drive (e.g. 'C:'), `False` otherwise.
xmlschema/utils/paths.py:32
↓ 19 callersFunctioniter_collapsed_content
Iterates a content stored in a sequence of couples *(name, value)*, yielding items in the same order of the sequence, except for repetitions
xmlschema/validators/models.py:890
↓ 18 callersFunctionetree_getpath
Returns the XPath path from *root* to descendant *elem* element. :param elem: the descendant element. :param root: the root element.
xmlschema/utils/etree.py:75
↓ 18 callersMethodfrom_uri
Parse a URI and return a LocationPath. For non-local schemes like 'http', 'https', etc. a LocationPosixPath is returned. For Windows
xmlschema/utils/paths.py:60
↓ 18 callersFunctionis_remote_url
(obj: object)
xmlschema/utils/urls.py:80
↓ 18 callersMethodmatch
(self, name: Optional[str], default_namespace: Optional[str] = None, **kwargs: Any)
xmlschema/validators/elements.py:1098
↓ 18 callersMethodrender
(self, names, parent=None, global_vars=None)
xmlschema/extras/codegen.py:215
↓ 17 callersMethodcheck_json_serialization
(self, root, converter=None, etree_element_class=None, **kwargs)
xmlschema/testing/_builders.py:374
↓ 17 callersMethodget_element
(self, tag: str, path: Optional[str] = None, namespaces: Optional[NsmapType] = None)
xmlschema/validators/schemas.py:946
↓ 17 callersMethodget_namespaces
(self, namespaces: Optional[NsmapType] = None, root_only: bool = True, root_default: bo
xmlschema/documents.py:591
↓ 17 callersMethodget_xmlns
Returns the list of namespaces declarations (xmlns and xmlns:<prefix> attributes) of the element. Returns `None` if the element doesn
xmlschema/resources/xml_loader.py:185
↓ 17 callersMethodis_matching
(self, name: Optional[str], default_namespace: Optional[str] = None, group: Optional['XsdG
xmlschema/validators/elements.py:1084
↓ 17 callersMethoditer_errors
Generates a sequence of validation errors if the XML data object is invalid. Accepts the same arguments of :meth:`validate`.
xmlschema/dataobjects.py:284
↓ 17 callersMethodoverall_max_occurs
Returns the overall maximum for occurrences of a content model particle.
xmlschema/validators/xsdbase.py:893
↓ 17 callersMethodoverall_max_occurs
Returns the overall max occurs of a particle in the model subtracting the occurrences already registered by the occurs counter. Defau
xmlschema/validators/models.py:570
↓ 17 callersMethodoverall_min_occurs
Returns the overall minimum for occurrences of a content model particle.
xmlschema/validators/xsdbase.py:885
↓ 17 callersMethodoverall_min_occurs
Returns the overall min occurs of a particle in the model subtracting the occurrences already registered by the occurs counter. Defau
xmlschema/validators/models.py:548
↓ 17 callersMethodunmap_qname
Converts a QName in prefixed format or a local name to the extended QName format. Local names are converted only if a default namespa
xmlschema/namespaces.py:292
↓ 16 callersFunctionget_extended_qname
Get the extended form of a QName, using a namespace map. Local names are mapped to the default namespace. :param qname: a prefixed QName
xmlschema/utils/qnames.py:124
↓ 16 callersMethodis_over
Tests if particle occurrences are equal or over the maximum. If the argument is `None` then tests the current element.
xmlschema/validators/models.py:622
↓ 15 callersMethodexport
Exports a schema instance. The schema instance is exported to a directory with also the hierarchy of imported/included schemas.
xmlschema/validators/schemas.py:1056
↓ 15 callersMethodget_namespaces
Extracts namespaces with related prefixes from the XML resource. If a duplicate prefix is encountered in a xmlns declaration, and
xmlschema/resources/xml_resource.py:743
↓ 15 callersMethodinvalid_type_error
(self, error: Union[TypeError, AttributeError], value: Any)
xmlschema/validators/facets.py:91
↓ 15 callersMethodis_emptiable
Returns `True` if the instance has an emptiable value or content, `False` otherwise.
xmlschema/validators/xsdbase.py:799
↓ 15 callersMethodmap_type
Maps an XSD type to a type declaration of the target language. This method is registered as filter with a name dependant from
xmlschema/extras/codegen.py:269
↓ 15 callersMethodnormalize
Normalize and restrict value-space with pre-lexical and lexical facets. :param text: text string encoded value. :return: a n
xmlschema/validators/simple_types.py:447
↓ 15 callersFunctionsort_content
(content: EncodedContentType, group: ModelGroupType)
xmlschema/validators/models.py:885
next →1–100 of 2,466, ranked by callers