- Fixed etree encoding checks for py2
- Fixed XSD 1.1 meta-schema restriction checking
- Set memory lazy tests to higher level (something
changed after lazy meta-schema build, need to be
checked with large XML files)
- 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.
- 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
- Children validation errors use a dummy element for reproducing the
instance (more clear and better printable than JSON conventions)
- Fix for 'all' models visiting
- Rewritten etree_tostring() helper function for implementing the
reindentation of the serialized XML
- Added tests for models validation
- Now all errors include reference to XML resource and namespaces
- Added namespaces argument to iter_errors() and validate() methods
- Modified etree_iterpath to map namespaces and to add position
predicates for repeated tags
- Added namespaces, relative and add_position to etree_getpath
- XsdValidator._parse_error() renamed to parse_error
- ValidationMixin._validation_error() renamed to validation_error
- Added test for errors completeness
- 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
- 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
- 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
- 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
- Fix XsdUnion iter_decode(): consider a list of values as
last tentative.
- Update etree_get_namespace(): now collects all the namespaces
of the XML data, adding new prefixes for duplicates.
- Added a method etree_elements_equal(elem, other, strict=True) on
compare two element tree structures with some flexibility on text
and tail (maybe needed also for attributes, but not now)
- Fixed base_type selection in XsdAtomicRestriction.iter_encode()
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
- XMLSchema class: changed get_converter() and iter_decode() to accept
keyword arguments containing options for converters and decoding
- Added a test for this issue into test_decoding.py
- Renamed namespaces contants in namespaces.py
- Related to residual emptiable content parsing of a top level
group of a sequence
- The patch code have to be moved to XsdGroup
- Added a case for the issue
Some refactoring to XsdComponent: target_namespace, namespace and maps
are trasformed to @property functions.
Update documentation for pass doctests.
* The `set_context` method has been removed because is not always
applicable starting from schema;
* Now all identity constraints paths are selected from instances;
* XPath select functions now have a name related to the selection scope;
* Added `etree_getpath` function in etree.py;
* Added `maxunicode` checks in codepoints.py (issue #32, Python 2.7
compiled without --enable-unicode=ucs4) for load only UCS-2 code points.
- 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
* fixed a bug in simpleContent restriction parsing for attributes
* code cleaning for schemas and resources
* XMLSchema's 'uri' attribute changed to 'url'
* created fetch_resource(), normalize_url() and get_xml_root() in
resources.py, in order to start an improvement of XML parsing
* New generator methods iter_encode and iter_decode
* Defined a concrete iter_errors for XsdBase and
removed from derived classes
* Removed etree.py
* Removed XMLSchemaMultipleValidatorError
* All validators are generator function now
* Renamed XmlSchemaValidatorError to XmlSchemaBaseValidatorError;
* Removed methods from the base exception class XmlSchemaException;
* Moved the body of XMLSchema.iter_errors method to a new
function etree_validation in the etree.py module;
* In the module etree.py: renamed the function element_to_dict to
etree_to_dict and removed the old one that was unnecessary.
* Now the heuristic to decode multiple list items into a list of lists seems correct.
modified: setup.py
modified: xmlschema/components.py
modified: xmlschema/etree.py
modified: xmlschema/resources.py
modified: xmlschema/schema.py
modified: xmlschema/utils.py