Commit Graph

24 Commits

Author SHA1 Message Date
Davide Brunato c530fda102 Fix openContent validation ad regex character group parsing
- Put interleave mode after model match for precedence
  - Fix regex parsing of character group ending with '-'
  - Fix complexType mixed content extension
2019-09-06 06:42:34 +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 3db78707b1 Complete openContent and defaultOpenContent parsing 2019-07-12 18:22:11 +02:00
Davide Brunato 5a5a0f6d47 Merge branch 'master' of github.com:sissaschool/xmlschema into develop 2019-07-03 06:51:49 +02:00
Davide Brunato 97a0da7138 Fix regex \w and \W shortcuts in character class (PR #114) 2019-06-27 13:43:50 +02:00
Thomas Ruster 28e369ad6f Corrected fix of multi-character escapes. The real issue was that the implementation of \w and \W was inverted. 2019-06-17 10:41:52 +02:00
Davide Brunato b01a8579d2 Complete W3C tests with valid schemas for XSD 1.0
- Added XsdElement.get_path()
  - Fixes for XSD types, identities and pattern facets
2019-03-19 10:58:12 +01:00
Davide Brunato 953924e35a Update Unicode categories module
- More speed on creating categories from unicodedata.category API
  - JSON serialized Unicode categories now include major categories
  - Delete unicode_categories.json from repo (it will be created by
    install command)
2019-03-12 07:08:10 +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 4f3e0d18ac Refactoring of UnicodeSubset and related functions completed 2018-10-17 07:06:51 +02:00
Davide Brunato 67f38f3f1a Refactoring of UnicodeSubset to use Python ranges 2018-10-15 21:50:18 +02:00
Davide Brunato 47af0bec35 Refactoring of Unicode data categories
- build_unicode_categories() replaces get_unicode_categories()
  - Added get_unicodedata_categories()
  - Removed unicode_category_sequencer()
  - Rewritten tests for Unicode categories
2018-10-15 09:00:20 +02:00
Davide Brunato 33c8e881bb Protect simple types lookups and base type building
- Added check_namespace_prefixes() test helper to XMLSchemaTestCase
  - Added namespace ckecks to encoded trees and errors
  - Update CHANGELOG.rst
2018-09-27 18:26:26 +02:00
Davide Brunato a7f5c41a85 Fix regex module
- 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.
2018-09-22 15:26:00 +02:00
Davide Brunato b1ec48f000 Fix for issue #79, test based. 2018-09-18 20:17:36 +02:00
Davide Brunato 199114699e Add single-character escapes to regex.py module
- Working on a fix for issue #79
2018-09-18 18:17:21 +02:00
Davide Brunato a9bc080ae5 Simplifying XSD components hierarchy
- Removed XsdAnnotated
  - XsdAnnotated._parse() now is owned by XsdComponent
  - XsdAnnotation _parse() method skip parent (XsdComponent) method
2018-04-05 09:28:49 +02:00
Davide Brunato d56208106b Update test scripts
- add setUpClass() method to test classes
  - XMLSchemaTestCase class removed
  - common test definitions are now in xmlschema/tests/__init__.py
  - xmlschema/tests/_test_common.py deleted
2018-01-09 10:52:39 +01:00
Davide Brunato 43d0c77eee Fixed bug #34, updated copyright information. 2018-01-08 09:15:09 +01:00
Davide Brunato 090af78c7a Key/Unique/Keyref identity constraints partially rewritten
* 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.
2017-12-28 08:28:27 +01:00
Davide Brunato 27717f360f Unicode categories rewritten:
- Fixing memory usage issue #32
  - Removed the old UnicodeSubset class
  - Developing class CodePointSet renamed to UnicodeSubset
  - Added XMLSchemaChildrenValidationError to package imports
  - Fixed a typo in test_all.sh script
  - Switched to version 0.9.16
2017-12-23 10:40:07 +01:00
Davide Brunato 010e21ad10 Saving experimental code before cleaning:
- Save some test functions for unicode data parse
  - Moved TestUnicodeCategories from test_meta.py to test_regex.py
2017-12-21 15:05:47 +01:00
Davide Brunato 248d4efa14 Added CodePointSet class:
- Using MutableSet to implement a ordered list based set
    for Unicode code points
  - Added test_regex.py test script for Unicode code points and
    XSD regular espressions
2017-12-20 09:51:30 +01:00