- Split decode()/encode() for components and for schemas
- Removed to_dict and to_etree for XSD components
- Updated fetch_schema_locations() to build XMLResource instance
- Added XMLResource.iterfind() for XPath iteration of a resource;
- Validator API refactored: remove path argument from iter_errors()
of components, add validate, is_valid, iter_errors to XMLSchema
class with additional arguments path and schema_path.
- Fix test case patterns.xml (now find also duplicated IDs)
- Fix SafeXMLParser and add tests for it
- SafeXMLParser raises only pure Python ParseError exception
- Add three XML cases with entities in xmlschema/tests/test_cases/resources/
- Remove SafeXMLParserError and use ElementTree.ParseError
- PyElementTree safe APIs errors are re-raised as C mod ParseError
- Simplify ElementTree API and XMLResource class
- The defusedxml seems to be unmaintained and has some problems
with the ElementTree loading
- Replaced by a safe XMLParser that forbids entities processing
- Added several tests
- Fixed start and end expression in regex.get_python_regex():
now puts '^(' and ')$' instead of '^' and '$'.
- Fixed '.' conversion in regex.get_python_regex(): raw string
qualifier removed from string literal.
- XMLResource.get_namespaces(): consider local root when adding
another default namespace
- Fix for XPath default namespace handling in ElementPathMixin
- Added namespaces argument to etree_tostring helper method.
- Refactored validator error string representation.
- Moved namespaces argument at last position for methods validate
and iter_errors of class ValidationMixin.
- Fixed document validate API and added tests for it
- Fix for issue #73
- Removed while cycle in iter_decode
- Consider that iter_decode_children methods yield only children
validation errors
- Added helper function etree_last_child
- Fix for normalize_url to replace backslashes.
- Created a check_url method for TestResources class.
- Use pathlib to check paths: PureWindowsPath class is
used for every Windows path (paths that contain '\\' or
':' or '|'), PurePath otherwise.
- Add leading slash to Windows paths with drive spec
before converting to URL.
- This is a more safer test for Element objects for this package, because it
also checks that the argument is not an instance of ElementPathMixin class
- Add tests for fetch_schema_locations and load_xml_resource functions
- ElementTree.parse() used when an URL is available.
- Skip source loading if not explicity requested (also if it's lazy).
- Add a remote test with Dublin Core schemas.
- Added copy(), __repr__ and __str__ to XMLResource class.
- Fixed XMLResource.get_locations(): now accepts also locations
already stored into a NamespaceResourcesMap dictionary.
- XMLSchema.iter_decode now always creates an XMLResource from
the source argument.
- Fix for XMLSchema.built property: has to count all namespace globals.
- Set default timeout=30 to fetch_* functions
- Use keyword arguments (**resource_options) for providing options
for XML resource related helper functions
- Add base_url to module level API
- Added XMLResource class for representing XML data sources
- Resource API now are based mainly on this class
- Attribute 'source' added to schema instances
- Now a warning message is sent to the logger for include or
for namespace import errors
- Add XMLSchemaImportWarning and XMLSchemaIncludeWarning
- Add warning attribute to schemas for collecting the message
strings about include and import warnings
- URIDict class removed (faulty with empty fragment #)
- Added --warning and --timeout to test factory arguments
- Removed --network from test factory arguments
- The normalization failed when url contains a .. or . subpaths
and base_url with a valid scheme is provided
- The fix could be also influence issue #44
Defuse XML data:
- Added 'defuse' argument to XMLSchema class
- Remote XML data is defused for default
- Optionally one can disable defusing or force also
for local XML data
Bug #58:
- Added a file for test circular model detection
Integrating defusedxml:
- defusedxml.ElementTree API loaded in etree.py
- safe load with defusedxml only for network resources
- now parses also WSDL-SOAP original schema
xmlschema/schema.py module:
- more XSD compiliant imports and includes
- added 'locations' argument to schema class init
- improved schema location hints
- revised documentation with more autodoc
- schema class code cleaning
- schema class creation is now based on a metaclass
xmlschema/resources.py module:
- added iter_schema_location_hints
- fetch_schema code cleaned
- removed old functions for retrieving XSI attributes
xmlschema/exceptions.py module:
- added index and expected attributes to XMLSchemaChildrenValidationError
Updated docs using more autodocs
Added requirements-dev.txt
- Fixed issues #28 and #29
- Code cleaning
- Created a "validators" subpackage that includes schemas, xsd global
maps and all the XSD components
- Added "prefixed_name" property to XsdComponent class
- Rewritten test scripts to use unitest standard interface
- Added a SchemaObserver class for impoving schema inspection
- Fixed a bug in component iter_errors() method
- Added validators and tests for date and time XSD builtins
- Documentation examples updated with Python 3