Commit Graph

21 Commits

Author SHA1 Message Date
Davide Brunato 249e555659 Improve content model encoding
- Update iter_collapsed_content() to perform a model conforming
    reordering.
2019-10-13 21:42:41 +02:00
Davide Brunato f5afa915fc Expand model tests with XMLSchema11 class 2019-08-31 07:22:44 +02:00
Davide Brunato 1c0e18b648 Fix XSD 1.1 xs:all group restriction
- Added an additional fallback check for xs:choice groups in
    Xsd11Group.is_all_restriction()
  - Fixed tests for wildcards and updated the W3C test script with
    total counters displayed before run
2019-08-26 11:01:41 +02:00
Davide Brunato e6fe1675c2 Fix fixed value check and model visiting with empty inner groups
- Added text_value() to XsdSimpleType and XsdComplexType for
    getting decoded text value for elements and attributes.
2019-08-26 08:10:58 +02:00
Davide Brunato dded8b163f Add sort_content() to ModelVisitor class
- Added TestModelBasedSorting to test_models.py
2019-07-11 11:45:29 +02:00
Davide Brunato 6994da5173 Code refactoring for tests
- Rename XMLSchemaTestCase to XsdValidatorTestCase
  - Add casepath() helper
  - Modify TestResources: derive from TestCase and use casepath()
  - Split test_package.py into 3 modules (added test_etree.py and
    test_memory.py)
  - Update .tox with new environments 'package' and 'memory'
  - Replace test_package with test_etree into test_all.py script
  - Modify XsdValidatorTestCase.check_schema() to use xs prefix for
    XSD namespace and no namespace as targetNamespace for a fast
    reuse of common and user sample cases
2019-06-20 15:35:04 +02:00
Davide Brunato d21ac11dde Fix default values decoding as reported by issue #108
- Default and fixed values are inserted during the decode or
    encode process
  - Update tox.ini to include coverage and flake8 to environments
    and an optional environment to build source and wheel packages
2019-05-31 09:29:41 +02:00
Davide Brunato 7b77f6be14 Split XSD group validators from model
- Code cleaning and refactoring in order to complete model verifiers
2019-04-09 16:56:28 +02:00
Davide Brunato 62c08282c3 Update XMLSchemaTestCase
- cls.abspath() replaced by cls.casepath()
2019-02-02 11:23:37 +01:00
Davide Brunato 5f10fe67a7 Code cleaning of test scripts
- Removed old code of xmlschema imports
  - Test header enriched with Python version and platform
2019-01-31 22:09:18 +01:00
Davide Brunato 9d6b88baae Change copyright years info 2019-01-20 16:56:10 +01:00
Davide Brunato 1f2ec717ec Fix for issue #86 2018-10-19 19:47:44 +02:00
Davide Brunato e048697925 Update XsdModelVisitor class 2018-09-13 19:22:47 +02:00
Davide Brunato c502b92127 Pre-optimization version of XsdModelVisitor class
- stop_item transformed to local method of XsdModelVisitor.advance()
  - stop_item recursion in case of unmatched internal group
2018-09-11 15:23:30 +02:00
Davide Brunato fe3078a3c7 Implement a new iter_decode method based on XsdModelVisitor 2018-09-08 11:19:51 +02:00
Davide Brunato 6326381cd7 Update documentation and add a deprecation warning for XMLSchema.parent_map 2018-08-27 17:32:26 +02:00
Davide Brunato b6d7470ab0 First production ready version for XsdModelVisitor class
- Helper method XsdComponent.to_string() renamed to tostring()
2018-08-24 22:27:11 +02:00
Davide Brunato 88e8a191d3 Other fixes for XsdModelVisitor and added schema_elem property to components 2018-08-24 07:20:08 +02:00
Davide Brunato 5a92df7315 Fix XsdModelValidator
- Now uses also ParticleMixin.is_emptiable() instead of "not min_occurs"
  - New methods is_missing() and is_over() for ParticleMixin
2018-08-23 07:27:15 +02:00
Davide Brunato 12b50298cc Complete encoding using model visitor class
- 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
2018-08-22 07:06:03 +02:00
Davide Brunato 37d76b1aed Add XsdModelVisitor class for helping on group validation 2018-08-18 08:29:10 +02:00