2016-10-14 13:48:19 +02:00
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
#
|
2019-01-20 16:53:23 +01:00
|
|
|
# Copyright (c), 2016-2019, SISSA (International School for Advanced Studies).
|
2016-10-14 13:48:19 +02:00
|
|
|
# All rights reserved.
|
|
|
|
# This file is distributed under the terms of the MIT License.
|
|
|
|
# See the file 'LICENSE' in the root directory of the present
|
|
|
|
# distribution, or http://opensource.org/licenses/MIT.
|
|
|
|
#
|
|
|
|
# @author Davide Brunato <brunato@sissa.it>
|
|
|
|
#
|
2019-08-01 07:03:03 +02:00
|
|
|
from .exceptions import XMLSchemaException, XMLSchemaRegexError, XMLSchemaURLError, \
|
|
|
|
XMLSchemaNamespaceError
|
2019-10-07 15:31:18 +02:00
|
|
|
from .etree import etree_tostring
|
2018-07-10 12:41:39 +02:00
|
|
|
from .resources import (
|
2018-07-11 12:56:19 +02:00
|
|
|
normalize_url, fetch_resource, load_xml_resource, fetch_namespaces,
|
|
|
|
fetch_schema_locations, fetch_schema, XMLResource
|
2018-07-10 12:41:39 +02:00
|
|
|
)
|
2018-07-26 17:47:00 +02:00
|
|
|
from .xpath import ElementPathMixin
|
2017-06-07 17:16:32 +02:00
|
|
|
from .converters import (
|
2019-07-11 09:43:12 +02:00
|
|
|
ElementData, XMLSchemaConverter, UnorderedConverter, ParkerConverter,
|
|
|
|
BadgerFishConverter, AbderaConverter, JsonMLConverter
|
2017-06-07 17:16:32 +02:00
|
|
|
)
|
2018-07-09 10:08:32 +02:00
|
|
|
from .documents import validate, to_dict, to_json, from_json
|
2016-10-14 13:48:19 +02:00
|
|
|
|
2018-08-09 07:10:39 +02:00
|
|
|
from .validators import (
|
2019-08-23 08:48:02 +02:00
|
|
|
XMLSchemaValidatorError, XMLSchemaParseError, XMLSchemaNotBuiltError,
|
|
|
|
XMLSchemaModelError, XMLSchemaModelDepthError, XMLSchemaValidationError,
|
|
|
|
XMLSchemaDecodeError, XMLSchemaEncodeError, XMLSchemaChildrenValidationError,
|
|
|
|
XMLSchemaIncludeWarning, XMLSchemaImportWarning, XMLSchemaTypeTableWarning,
|
|
|
|
XsdGlobals, XMLSchemaBase, XMLSchema, XMLSchema10, XMLSchema11
|
2017-12-14 13:38:23 +01:00
|
|
|
)
|
|
|
|
|
2019-08-28 09:33:49 +02:00
|
|
|
__version__ = '1.0.15'
|
2016-10-14 13:48:19 +02:00
|
|
|
__author__ = "Davide Brunato"
|
|
|
|
__contact__ = "brunato@sissa.it"
|
2019-01-20 16:53:23 +01:00
|
|
|
__copyright__ = "Copyright 2016-2019, SISSA"
|
2016-10-14 13:48:19 +02:00
|
|
|
__license__ = "MIT"
|
2017-02-17 22:20:50 +01:00
|
|
|
__status__ = "Production/Stable"
|
2016-10-14 13:48:19 +02:00
|
|
|
|
2019-01-31 22:09:18 +01:00
|
|
|
|
|
|
|
# API deprecation warnings
|
2019-02-03 14:07:17 +01:00
|
|
|
def XMLSchema_v1_0(*args, **kwargs):
|
|
|
|
import warnings
|
2019-05-31 09:29:41 +02:00
|
|
|
warnings.warn("XMLSchema_v1_0 class name has been replaced by XMLSchema10 "
|
2019-02-03 14:07:17 +01:00
|
|
|
"and will be removed in 1.1 version", DeprecationWarning, stacklevel=2)
|
|
|
|
return XMLSchema10(*args, **kwargs)
|
2019-01-31 22:09:18 +01:00
|
|
|
|
2019-04-08 07:29:09 +02:00
|
|
|
|
2019-02-03 14:07:17 +01:00
|
|
|
def etree_get_namespaces(*args, **kwargs):
|
|
|
|
import warnings
|
|
|
|
warnings.warn("etree_get_namespaces() function name has been replaced by fetch_namespaces() "
|
|
|
|
"and will be removed in 1.1 version", DeprecationWarning, stacklevel=2)
|
|
|
|
return fetch_namespaces(*args, **kwargs)
|