Commit Graph

27 Commits

Author SHA1 Message Date
Davide Brunato 9146d94d43 Fix assertion value for schema context analisys 2019-10-10 14:20:58 +02:00
Davide Brunato 75664150e6 Improve XPath bindings
- Extend ElementPathMixin with instance _xpath_parser
  - Add xpath_tokens dictionary to schema objects
  - Fix serialization removing xpath_tokens classes
2019-10-09 15:03:50 +02:00
Davide Brunato b7b6fef418 Base modules refactoring for fix ElementTree import 2019-10-07 15:31:18 +02:00
Davide Brunato 7fcacde313 Fix issue #136
- Protect facets validators from type and value errors
  - Add strictly_equal() helper to check fixed value equality
  - Move get_instance_type() from XsdType to global maps
2019-10-03 22:00:32 +02:00
Davide Brunato 844ddec3ba Fix assertions
- Add custom parser for assertion facet (without position() and last()).
  - Move parser initialization to XsdAssert.parse_xpath_test() because
    all the components must be defined.
2019-10-01 06:44:31 +02:00
Davide Brunato 8d56d128ca Add XSD 1.1 inheritable check on XML instance validation
- Add substitutes to dynamic checks
2019-09-23 09:26:31 +02:00
Davide Brunato 0480e4bee8 Add is_override() to XsdComponent for XSD 1.1 schemas
- Change is_global() from property to function
2019-09-19 06:37:42 +02:00
Davide Brunato 07070ad714 Fix W3C instance tests
- Add iter_substitutes() to Xsd11Element to fix upa.xsd/upa2.xsd
    tests with instances. Now for XsdElement the abstract substitutes
    are simply ignored by iter_substitutes().
2019-09-11 18:43:13 +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 9e58e99e01 Add XSD 1.1 support and XSD components API to documentation 2019-08-19 13:52:30 +02:00
Davide Brunato 7a0dbf9afc Fix other XSD 1.1 parsing errors for wilcards 2019-08-17 09:36:24 +02:00
Davide Brunato 52d1e1bb8e Close XSD 1.1 development
- Still some W3C and local tests to be fixed
  - Fix min/max facets derivation (decode with primitive type)
2019-08-05 17:57:34 +02:00
Davide Brunato 6e90de7b4c Add Version Control namespace attributes
- Added xsd_version property to XSD components
  - Add version_check() helper to XsdValidator base class
2019-07-31 14:19:02 +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 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 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 878a1815db Add _parse_xpath_default_namespace() to XsdComponent
- Removed get_xpath_default_namespace() helper and its tests
  - Removed xpath_default_namespace property from XsdComponent
2019-02-23 12:45:44 +01:00
Davide Brunato a341721d59 Modify assertion facets
- Move XsdAssertion to XsdAssertionFacet
  - Removed XsdAssertionFacets
  - Refactoring of XSD facets parsing
2019-02-23 09:18:36 +01:00
Davide Brunato 9cc61e8788 Rewrite assertions implementation 2019-02-22 22:50:05 +01:00
Davide Brunato 7d71d27011 Add XsdAssertion class in new module assertions.py 2019-02-11 17:50:55 +01:00
Davide Brunato 074e42c9d1 Closing the release v1.0.8 2019-01-30 18:02:35 +01:00
Davide Brunato 9d6b88baae Change copyright years info 2019-01-20 16:56:10 +01:00
Davide Brunato c790838d13 Move XSD builtin QNames to qnames.py module 2018-10-08 15:32:50 +02:00
Davide Brunato a34033ee2f Improve matching and use unicode_literals
- Added names attribute for XSD declarations
2018-09-15 22:18:16 +02:00
Davide Brunato 73cbd12f58 Added source attribute to XMLSchemaValidatorError 2018-08-06 16:48:29 +02:00
Davide Brunato a823e1d504 Rename XsdBaseComponent as XsdValidator 2018-08-06 07:11:37 +02:00
Davide Brunato e92c42154f Start to add XSD 1.1 features
- Added xpathDefaultNamespace attribute parser method
  - Added validation='strict' argument to XsdBaseComponent
  - Moved _parse and _parse_error methods to XsdBaseComponent
  - XPathMixin renamed to ElementPathMixin
2018-01-27 16:44:27 +01:00