Commit Graph

20 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 33b6db54e9 Refactoring of ModelVisitor and Xsd11AnyElement
- Modify ModelVisitor for using XSD 1.1 xs:all groups
  - Remove inverted list from _subgroups item
  - Use occurs to store sum of xs:all items
  - Add precedences to Xsd11AnyElement for managing cases of
    overlapping wildcard (overlap with an adjacent element
    that also matches an item).
2019-09-04 10:53:59 +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 747036aad4 Fix for issue #127 and other W3C XML tests
- Added data_value() method to XsdElement and XsdAttribute()
  - Rename identity constraints dictionaries to 'identities'
  - Fix XSD 1.1 wilcards
2019-08-25 22:51:00 +02:00
Davide Brunato a6ef42d926 Fix model checking
- Do not check same elements (pe is e)
  - distinguishable_paths() now checks also intermediate xs:choice
    and xs:all groups
2019-08-23 08:43:41 +02:00
Davide Brunato 9e58e99e01 Add XSD 1.1 support and XSD components API to documentation 2019-08-19 13:52:30 +02:00
Davide Brunato d4bb951a45 Improve schema checks
- Checked and improved 'built' properties for XSD components:
      * Simple types, attributes and attribute group are now built
        withoug cheching on base types.
      * Don't check global subcomponents: the scope of built is to
        assure that local parts are built.
  - Split global maps checks from build phase:
      * XsdGlobals._check_schema substituted by check() method with
        two opional arguments. The new methos is useful also to check
        global maps also after schema building.
  - Added validator=None argument to parse_error() method
2019-07-30 14:52:51 +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 87cc74fc44 Added unordered and collapsed encoding modes
- Keep UnorderedConverter class as the default converter for
    encoding unordered data
  - Added 'unordered=False' option to iter_encode's arguments
  - Added iter_unordered_content() and iter_collapsed_content()
    to ModelVisitor class
2019-07-11 09:43:12 +02:00
Davide Brunato 40d0207968 Clean element matching
- Added custom is_matching() and match() for XsdElement
  - Removed custom match() for XsdAnyElement and XsdAnyAttribute
  - Added matched_element() to XsdAnyElement
  - Added matched_element() to XsdElement as match() alias
  - Removed iter_elements() from XsdGroup (do not iter substitutes)
  - Removed iter_subelement() from ModelGroup (use iter_elements)
  - Clean converter code on some element_encode() implementations
2019-07-08 09:37:29 +02:00
Davide Brunato d3775dad0e Remove attribute 'broken' from ModelVisitor
- Attribute replaced by a local variable in XsdGroup.iter_decode()
2019-06-23 08:49:16 +02:00
Davide Brunato 2de9756b73 Fix expected items on model checking
- Empty expected fixed in ModelVisitor.advance()
  - Better message for expected tags for XMLSchemaChildrenValidationError
2019-06-21 22:20:32 +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 3f470927b8 Code cleaning and package dependencies update 2019-05-05 15:13:40 +02:00
Davide Brunato db18407ca2 Fix wildcards and models checks 2019-04-27 23:15:24 +02:00
Davide Brunato 9e1e25d985 Complete model checking (restriction and determinism) 2019-04-24 19:40:38 +02:00
Davide Brunato 36dbb1a904 Move and fix XsdType.is_derived()
- Method replaced by an abstract method and moved to XsdSimpleType
2019-04-15 18:49:42 +02:00
Davide Brunato 8f4eaaa46c Fix model group checking
- Refactoring ParticleMixin hierarchy
2019-04-15 13:07:31 +02:00
Davide Brunato e6fd152843 Fix simple restriction checking 2019-04-11 07:09:19 +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