- Additional options (--xsd10, --xsd11, --valid, --invalid, a
list of indexes) to run only a subset of the W3C tests.
- Run also XML tests with --xml option.
- Add filter for import warnings that are out of the scope of
tests with W3C XSD 1.1 suite
- 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
- 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
- In XMLSchema.__init__() the errors generated by check_schema()
are now raised or transformed to parse errors
- Only parse errors are generated during schema building
- More compact errors that omit meta-schema parts
- Removed additional test classes added with PR #117;
- Removed additional converter argument from the calls of the
method get_converter(), that causes errors when the argument
'converter' is provided but not with an instance.
- Keep UnorderedConverter class as the default converter for
encoding unordered data
- Added 'unordered=False' option to iter_encode's arguments
- Added iter_unordered_content() and iter_collapsed_content()
to ModelVisitor class
- 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
These attrs shouldn't be used to reopen the file object as:
- they may not reflect the original file or resource (file objects
opened from a zipfile will have a name that doesn't correspond to any
file on disk).
- Depending on how the fid was opened, these attrs could be crafted to
read arbitrary files from disk. If the creator of a .zip gives a file
inside the zip file a path of `/etc/passwd` we may end up opening that
file.
Instead of reopening the file, we keep track of the file object and seek
to the beginning of the file. This means (for most operations) the file
object must be seekable. On Python 2 urlopen returns an unseekable
object for 'file://' paths. One test had to be skipped in Python 2 for
this reason.
This problem comes from the way `XMLResource` re-opens files if it wants
to get more information from them. `XMLResource` is deriving the source
location of file like objects from their `name` attr. When that attr
doesn't correspond to a file on disk (zipfile contents, Django files) an
error is raised when `XMLResource.open()` is called.
- Add lossy property as a replace for lossless (not lossy)
- replace _unmap_attribute_qname() with unmap_prefixed()
- Add deprecation warnings for old methods
- Resolves #69
This approach allows strict encoding and validation of an unordered
dictionary without having to handle errors.
- Can generate correct xml for repeated sequences of multiple elements:
{"A": [1, 2], "B": [3, 4]} -> <A>1</A><B>3</B><A>2</A><B>4</B>
- VisitorConverter raises an Exception if the data being encoded
contains cdata. The unordered processing of the dict means character
data may not be placed in the correct locations.
- Reuses existing encoding tests.
- Meta schema lazy build: reduce memory usage for meta-schema if
only one schema class is used between XMLSchema10 and XMLSchema11
- Improve import_package() in check_memory.py
- Rename XMLSchemaTestCase to XsdValidatorTestCase
- Add casepath() helper
- Modify TestResources: derive from TestCase and use casepath()
- Split test_package.py into 3 modules (added test_etree.py and
test_memory.py)
- Update .tox with new environments 'package' and 'memory'
- Replace test_package with test_etree into test_all.py script
- Modify XsdValidatorTestCase.check_schema() to use xs prefix for
XSD namespace and no namespace as targetNamespace for a fast
reuse of common and user sample cases