Davide Brunato
b7b6fef418
Base modules refactoring for fix ElementTree import
2019-10-07 15:31:18 +02:00
Davide Brunato
b1663c5550
Add root_type property to XsdType
...
- Atomic's property primitive_type transformed to attribute
- Optimized base_type assignement
2019-09-21 10:47:11 +02:00
Davide Brunato
a95dfe26fe
Add is_list() to XsdSimpleType and fix xs:QName length facets
2019-09-19 19:00:05 +02:00
Davide Brunato
590c7e6c41
Add intersection() to XsdWildcard
...
- Renamed XsdWildcard.extend() to union()
2019-09-17 16:37:16 +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
7b5a2b9d6d
Removed unmap_prefixed() from NamespaceMapper
...
- Added an optional name table to unmap_qname() for the lookup
of local names
- Fix lxml encoding tests in case of default namespace
2019-08-27 10:58:32 +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
6c47e49971
Fixing W3C XSD 1.1 schema tests
...
- Add XSD 1.1 skip list in W3C test script
- Regex: check unescaped double hyphens (--)
- Check model extension allowed types
2019-08-23 08:48:02 +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
7ef629e6c3
Add xs:all restriction checking for XSD 1.1
2019-08-12 18:23:43 +02:00
Davide Brunato
3ff9e8b010
Add openContent override to include notQName
...
- Replace list_builtins.xsd with xsd11-extra.xsd
2019-08-10 23:59:38 +02:00
Davide Brunato
f8ad4d975c
Code cleaning: remove get_xml_bool_attribute() helper function
2019-08-09 12:45:11 +02:00
Davide Brunato
f2a30baf32
Fix XSD 1.1 bugs with W3C XML Schema suite
2019-08-01 17:16:12 +02:00
Davide Brunato
df5c454b24
Add minimal schema for versioning namespace
...
- Added XMLSchemaNamespaceError for namespace related errors
- version_check moved to schema class
- resolve_qname() now raises KeyError if namespace prefix is not found
- resolve_qname() now raises XMLSchemaNamespaceError if a namespace
is mapped with a prefix but is not loaded by an import
2019-08-01 07:03:03 +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
3d33424541
Refactor and clean reference and name attributes parsing
...
- Add an helper method _parse_reference()
- Removed ref property, replaced by attribute
2019-07-29 16:01:48 +02:00
Davide Brunato
035be87572
Complete XSD 1.1 wildcards (xs:any and xs:anyAttribute)
2019-07-23 16:02:17 +02:00
Davide Brunato
281a426ec4
Code optimization on parse helpers
...
- Remove iter_xsd_components() and has_hsd_components() helpers
replaced by filter() and any() calls
2019-06-26 07:27:18 +02:00
Davide Brunato
fe521dcaf4
Uniformating iter_decode/iter_encode arguments for XSD components
...
- Move optional argument 'converter' to keyword arguments
- Adjust filler parameter usage in XsdAttributeGroup.iter_decode
2019-06-08 09:43:15 +02:00
Davide Brunato
318f5391ec
Add optional arguments to XMLSchema.iter_decode()
...
- Added 'filler' callback function
- Added 'fill_missing' boolean option
2019-06-07 19:41:19 +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
b36472bd6d
Fix tests for a new release
...
- W3C test script cleaned
- Fix attribute wildcard extension: new method extend_namespace()
- Generate an error if schema has the attribute targetNamespace=''
- Fix complexType redefinition checks
- Fix UPA violation checking
2019-04-29 11:44:15 +02:00
Davide Brunato
db18407ca2
Fix wildcards and models checks
2019-04-27 23:15:24 +02:00
Davide Brunato
c4385f4559
Fixes for bad schemas checks
2019-04-27 19:41:26 +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
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
Davide Brunato
14ac859b33
Write redefinition checking
...
- Added class attribute redefine=None to XSD types and groups: this
attribute is ovverridden by instance attribute in case of a redefine
2019-04-07 11:50:22 +02:00
Davide Brunato
58af73dd1b
Refine checks on models and restrictions
2019-04-04 09:06:46 +02:00
Davide Brunato
d58f8b7130
Add helper function get_xsd_form_attribute()
2019-03-27 15:20:13 +01:00
Davide Brunato
b221fa255f
Bugfix for attributes and attribute groups
2019-03-27 11:59:22 +01:00
Davide Brunato
37595da57c
Add model checks after schema build
...
- Added check on type matching of same elements
- Added XsdGroup.check_particles() for check Unique Particle Attribution
Constraint of schema
- Fixed group redefine (clear in any case when _parse begins)
2019-03-21 07:14:58 +01:00
Davide Brunato
5917873b7f
Add resolve_qname() to XMLSchemaBase
...
- Replace prefixed_to_qname() with resolve_qname()
- Code cleaning for helpers.py module
- Add schema defaults as XMLSchemaBase class attributes
2019-03-14 15:18:28 +01:00
Davide Brunato
069146fd22
Integrating with W3C test suite
...
- Fix the decoding of attributes with a default value
- Fix parse of the element type
- Fix parse of the element block attribute
2019-03-06 17:09:16 +01:00
Davide Brunato
bcf6f7b21b
Replace XsdSimpleType.check_facets() with _parse_facets()
2019-03-02 09:39:11 +01:00
Davide Brunato
a8eebf3d15
Starting integration with W3C test suite
...
- Added a script for using W3C test suite with unittest
- Started with invalid schema tests
2019-03-01 09:33:06 +01:00
Davide Brunato
ccfaab9479
Fix XML resource defusing
...
- Add XMLResource.defusing() for checking XML data
- Now in XMLResource.parse() and fromsource() the SafeXMLParser is
used only for defusing data
2019-02-25 13:34:52 +01:00
Davide Brunato
13a5f5371c
Parse of XSD 1.1 targetNamespace of elements and attributes
...
- Added XsdComponent._parse_target_namespace()
2019-02-07 23:10:31 +01:00
Davide Brunato
074e42c9d1
Closing the release v1.0.8
2019-01-30 18:02:35 +01:00
Davide Brunato
95b5f47329
Add inheritable attributes
...
- Fix attribute class builder in XsdAttributeGroup class
2019-01-29 08:58:51 +01:00
Davide Brunato
14488d06d1
Add defaultAttributes for XSD 1.1 schemas
...
- Added two test schema cases in features/attributes/
- Added TestValidation11 class with a test for default attributes
2019-01-23 17:08:01 +01:00
Davide Brunato
b8b31f95ca
Remove old XSD datetime types validators
...
- Add test subclass TestDecoding11
- Remove unused regex patterns related to datetime types
2019-01-20 22:59:23 +01:00
Davide Brunato
9d6b88baae
Change copyright years info
2019-01-20 16:56:10 +01:00
Davide Brunato
e61c826d4e
Add XSD datatypes for durations and date/time
...
- datatypes imported from elementpath 1.1
2019-01-01 16:52:54 +01:00
Davide Brunato
fd5b6c9230
Fix for issue #96 (import deprecation warning)
2018-12-23 17:48:24 +01:00
Davide Brunato
bd90cacc7a
QNames refactoring
...
- Moved all QNames to the same module
- Create module helpers.py that includes XSD parse utils and name
manipulation helper functions
2018-10-08 23:47:18 +02:00
Davide Brunato
c790838d13
Move XSD builtin QNames to qnames.py module
2018-10-08 15:32:50 +02:00
Davide Brunato
79fdea9a55
Code cleaning: removed get_xml_attribute helper function
2018-10-05 07:15:25 +02:00
Davide Brunato
16b0b61a20
Code refactoring for XsdSingleFacet
...
- Created a class for each facet type
- Use of _parse method instead of init
2018-10-04 15:55:55 +02:00