Commit Graph

729 Commits

Author SHA1 Message Date
Benjamin Dauvergne 78c22b25d9 debian: add dependency on python-elementpath (#37815) 2019-11-21 17:01:35 +01:00
Benjamin Dauvergne b36c1a1f61 debian packaging 2019-11-19 15:39:40 +01:00
Davide Brunato 436567a8ad Fix documentation sections 2019-11-18 10:21:40 +01:00
Davide Brunato 1a1ec82586 Merge branch 'develop' for updating to release v1.0.16 2019-11-18 10:10:57 +01:00
Davide Brunato db45230fd6 Merge setup.py from PR #143 and update release information 2019-11-18 09:48:06 +01:00
Davide Brunato 92de835afa Fix defaultOpenContent and defaultAttributes parsing 2019-11-18 09:16:01 +01:00
Davide Brunato a60532a3ab Fix sequence model stop criteria 2019-11-15 17:49:46 +01:00
Davide Brunato f72c23b972
Merge pull request #143 from jayvdb/setup-requires
setup.py: Add setup-requires
2019-11-15 10:10:46 +01:00
Davide Brunato 8207284c5a Clean models.py module from unused code 2019-11-15 09:25:04 +01:00
Davide Brunato fc3141283d Fix some W3C failed tests
- fix inherited attrs composition in XSD elements
  - check single ID for element's attributes validation
2019-11-14 18:44:31 +01:00
John Vandenberg 4b7b16a750 setup.py: Add setup-requires 2019-11-14 23:01:40 +07:00
Davide Brunato 79cf89af86 Fix ambiguous choice models visiting
- Fixed registering max occurs for tuple (group,)
  - TODO: maybe the same solution for 1-length sequence groups
2019-11-14 11:18:11 +01:00
Davide Brunato 7c4cd8b4d3 Change stop_item() in ModelVisitor.advance()
- Removed ParticleMixin.min_occurs_reps()
  - Removed ModelGroup.group_occurs()
2019-11-08 16:40:02 +01:00
Davide Brunato 2bcf78549c Add count_occurs() to ModelGroup 2019-11-08 07:17:29 +01:00
Davide Brunato d0f3a0f6c8 Skip ElementTree import test with external process on Windows platform 2019-11-06 11:49:09 +01:00
Davide Brunato b8ccfac6f1 Update test_resources avoiding usage of unapplicable 'file' scheme 2019-11-06 11:40:51 +01:00
Davide Brunato dc82f04874 Filter normalize_url result 2019-11-06 10:39:51 +01:00
Davide Brunato 24a08c4442 Add replacing of backslashes from normalize_path result 2019-11-06 10:22:09 +01:00
Davide Brunato 896982222f Fix Windows paths normalization 2019-11-06 09:49:00 +01:00
Davide Brunato dd2ab72654 Add iter_group() to ModelVisitor 2019-11-05 11:09:34 +01:00
Davide Brunato b95d890f51 Refine 'all' models visiting
- Restart at every match with not exhausted items
  - Do not check occurs on stop_item()
  - Do not reset element counter when repeat
2019-10-31 16:20:10 +01:00
Davide Brunato 4c624af6c9 Fix name matching and targetNamespace for XSD 1.1 declarations
- Use the targetNamespace of reference
  - In case of a default namespace try also the match with the local name
2019-10-30 18:05:41 +01:00
Davide Brunato 2b1497860b Fix 'all' model groups visiting
- Also at each match the group element is changed (TODO: check if
    it's better to restart like choice groups)
  - In XSD 1.1 __iter__ now yields wildcards at the end for 'all'
    and 'choice' model groups
2019-10-30 07:13:47 +01:00
Davide Brunato 732864edc7 Fix xs:ID counting for nodes without parent
- Consider attributes with level+1 as child elements
  - Clean XsdAtomicBuiltin.iter_decode() method
2019-10-28 12:31:10 +01:00
Davide Brunato c963970549 Fix openContent's appliesToEmpty attribute use 2019-10-25 23:02:13 +02:00
Davide Brunato ded91458a1 Extend schema validation to match every defined global element
- Should be a fix for issue #140
2019-10-25 10:28:42 +02:00
Davide Brunato df6eb23516 Add XML data depth limits
- Add module xmlschema.limits for store processing limits
  - Add max_depth optional argument to decode methods
  - Code cleaning for iter_decode() kwargs (elements and groups)
2019-10-25 06:35:15 +02:00
Davide Brunato a374d15805 Fix resource tests for Python 2 2019-10-24 06:37:31 +02:00
Davide Brunato 6942be8ac9 Optimize qname_to_prefixed() and get_namespace() helpers
- use_empty optional argument added to qname_to_prefixed()
2019-10-23 09:47:49 +02:00
Davide Brunato c075ff22e5 Complete the revision of resource module
- normalize_url() now processes file names containing '#' chars
  - Fix iterfind() of lazy resource
  - Add more tests for XML resources
2019-10-22 18:37:26 +02:00
Davide Brunato 8db83477df Extend check_memory.py script
- Add an argument to repeat test N times
  - Add matplotlib to dev requirements
2019-10-22 14:28:46 +02:00
Davide Brunato 8dd5d193ba Update XML resource iterfind() to fix issues #102 and #112
- Speed up admitting simple paths and checking only elements
    that match path level
  - Avoid selection for * paths (about 35% faster)
  - Add close() method to XmlResource
2019-10-21 06:57:02 +02:00
Davide Brunato 43322b6bc0 Refactor XmlResource after merge
- Remove _document and _fid (use the attribute source instead)
2019-10-19 00:08:09 +02:00
Davide Brunato 2ed0212002 Add option -n/--narrow to tests for skipping extra checks 2019-10-19 00:04:28 +02:00
Davide Brunato 257ef230c4
Update test_resources.py 2019-10-17 10:50:24 +02:00
Davide Brunato 9443adf396 Merge branch 'master' of github.com:sissaschool/xmlschema into develop 2019-10-17 10:42:04 +02:00
Davide Brunato 60663ef74b
Merge pull request #122 from danifus/b121
B121
2019-10-17 10:04:20 +02:00
Davide Brunato 54060ba0df Modify resources.fetch_schema_locations()
- Now can returns location for another namespace if hints for
    resource namespace are missing
2019-10-16 21:14:15 +02:00
Davide Brunato 7d0d251837
Merge branch 'master' into b121 2019-10-16 18:11:49 +02:00
Davide Brunato 248b9f9b68 Update XSD validation with wildcards
- Add load_namespace() to XsdGlobals
  . Modify iter_decode/iter_encode for xs:any and xs:anyAttribute
2019-10-16 15:22:49 +02:00
Davide Brunato 8407f09139 Add LOCATION_HINTS dict to namespaces module
- Use LOCATION_HINTS for schema's fallback locations
2019-10-16 06:45:53 +02:00
Davide Brunato 285b5e3b5b Update to release v1.0.15 2019-10-13 22:12:57 +02:00
Davide Brunato 298ceb117a Merge branch 'develop' for upgrade to v1.0.15 2019-10-13 22:11:58 +02:00
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 de7e2343bd Implement element substitution and xsi:type block in instances 2019-10-12 22:59:54 +02:00
Davide Brunato 22fdcc9a5a Fix etree_to_string to avoid registering reserved prefixes 2019-10-12 11:23:31 +02:00
Davide Brunato d89a597c82 Update documentation and fix PEP8 errors 2019-10-11 13:44:10 +02:00
Davide Brunato a79a5583ae Fix datetime types validation on encoding
- Add is_datetime() to XSD types classes
2019-10-11 13:26:17 +02:00
Davide Brunato 997c59c837 Fix locations argument usage
- Used to import other namespaces explicitly (as disposed by
    "xsi:schemaLocation" in an XML instance).
  - It's not propagated to included/imported schemas anymore.
2019-10-10 20:35:45 +02:00
Davide Brunato 588f17a1f9 Fix xs:error type decoding/encoding 2019-10-10 20:34:40 +02:00