Commit Graph

34 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 41c2955ed5 Fix Unicode block lookup for XSD 1.1
- Fox XSD 1.1, in case of Unicode block lookup error (unknown
    Is... name) a set with all Unicode codepoints is returned.
2019-08-12 18:18:30 +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 c5e373dc8c Fix regular expression parsing with forbidden escapes
- \uXXXX and \xXX escapes are not allowed for XSD regex
2019-04-17 19:09:31 +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 d0cad5b52b Add compatibility code for Python 2.7
- Typo in codepoints.py for compat chr()
  - Add a fake lru_cache decorator for Python 2.7
2019-03-14 11:41:15 +01:00
Davide Brunato 422380f06e Fix schema's imports and includes
- Now each schema has a dict for imports and a list for includes
  - Argument meta_maps changed with use_meta
  - Added use_meta property
2019-03-13 16:01:14 +01:00
Davide Brunato 9aaa9f1244 Add post install/develop command for create Unicode categories JSON
- Adding a test for JSON file of Unicode categories
  - Added and renamed test cases for includes and imports
2019-03-13 06:53:10 +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 9d6b88baae Change copyright years info 2019-01-20 16:56:10 +01:00
Davide Brunato e4f80cbca3 Use raw string literals in function code_point_repr of codepoints.py 2018-12-23 17:50:08 +01:00
Davide Brunato fd5b6c9230 Fix for issue #96 (import deprecation warning) 2018-12-23 17:48:24 +01:00
Davide Brunato cf39376d14 Code cleaning in regex.py module and bugfix
- Bugfix in iterparse_character_group(): protect from string
    iterator ending during parsing of a bad character class
2018-10-18 10:30:26 +02:00
Davide Brunato 7215add317 Code cleaning of module codepoints.py 2018-10-17 11:33:49 +02: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 3285f32b8a Fix test factory arguments helper 2018-07-07 23:26:41 +02:00
Davide Brunato 3e6ce18ae4 Rewritten includes and imports for schema initialization
- Now a warning message is sent to the logger for include or
    for namespace import errors
  - Add XMLSchemaImportWarning and XMLSchemaIncludeWarning
  - Add warning attribute to schemas for collecting the message
    strings about include and import warnings
  - URIDict class removed (faulty with empty fragment #)
  - Added --warning and --timeout to test factory arguments
  - Removed --network from test factory arguments
2018-07-07 11:25:00 +02:00
Davide Brunato f88fb8d55a Add a fix and a test for issue #57 2018-04-11 07:06:38 +02:00
Davide Brunato 2aa54915fa Add XsdType class and replace check functions with assert
- XsdType is now the super class for XsdSimpleType and XsdComplexType
  - XsdType includes some concrete methods and several abstract methods
  - XsdType has also base_type and derivation class attributes
  - check_type() and check_value() replaced with assert based checks
2018-04-05 13:07:09 +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 4f7590bda2 Fix for issue #45 2018-03-08 13:32:16 +01:00
Davide Brunato db1821a229 Put a patch for issue #35 in XsdGroup.iter_decode
- Related to residual emptiable content parsing of a top level
    group of a sequence
  - The patch code have to be moved to XsdGroup
  - Added a case for the issue

Some refactoring to XsdComponent: target_namespace, namespace and maps
are trasformed to @property functions.

Update documentation for pass doctests.
2018-01-20 06:11:43 +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
Davide Brunato b014d43ec0 Moved UnicodeSubset and related code to codepoints.py module. 2017-12-19 10:52:18 +01:00
Davide Brunato 094caa146e Some refactoring and bug fixes.
- Fixed issues #28 and #29
  - Code cleaning
  - Created a "validators" subpackage that includes schemas, xsd global
    maps and all the XSD components
  - Added "prefixed_name" property to XsdComponent class
2017-12-15 15:56:07 +01:00
Davide Brunato 6e992aab09 Fixed some bugs, code cleaning:
* Fixes for bugs #14, #15, #16
  * Removed unused module xmlschema/etree.py
  * Added tests for URLs processing (test URL normalization)
  * Updated licence information (added "-2017")
2017-09-14 13:31:02 +02:00
Davide Brunato da0e49d46f Some minor fixes:
- Added unicode_categories.json in data files of setup.py;
  - Added description field to setup.py;
  - Replaced set() with frozenset() in Unicode blocks dictionary;

    modified:   setup.py
    modified:   xmlschema/codepoints.py
2017-03-22 12:37:40 +01:00
Davide Brunato 7cdf245496 Improved the processing of XML Schema regular expressions:
- Fixed patterns validation calls
  - Improved the regex translation
  - Fixed Unicode literals representation
  - Added testfiles for patterns
2017-03-22 11:30:27 +01:00