Davide Brunato

Results 129 comments of Davide Brunato

Anyway a generic method (e.g. `XMLSchema.create_xml_data()`) could be an option for the future taking count at least of two things: * maximum occurrences of elements (otherwise unbounded particles will be...

An example to show how the model visitor can be used for that purpose: ```pycon >>> import xmlschema >>> from xmlschema.validators import ModelVisitor >>> from random import randint >>> >>>...

You have to write a custom filter. The current version of `ModelVisitor` is not fully suitable for this role (it was build for validation of an existing content, not for...

For checking if a particle of a model group is optional I will add a new method to `XsdGroup` objects: ```python def is_optional(self, particle: ModelParticleType) -> bool: """ Returns `True`...

Hi @ethindp, v3.4 releases include extensions for `ModelVisitor` that should accomplish the basic tools for building a content generator (in the manner that one needs). If you are still interested...

Closing this. Reopen it for any observations on the issue.

Hi, sorry for the delay. The problem with your second test is that you have a JSON object with to elements, that means with the default converter that they should...

Hi, the XSD enumeration has a xs:QName as base type, so prefixed values have to be converted to expanded form (the prefix can change ...). The fix for this is...

Hi, release v3.4.2 with the latest release of `elementpath` should resolve the encoding of QNames (by improving the decode of XSD datatypes and taking the namespace information from the element...

Hi, I will insert a fix in the next release of the package. The fix requires a change of these lines: https://github.com/sissaschool/xmlschema/blob/059fd3bfb305809d5ebdede1bd68dff9dbaf3348/xmlschema/validators/elements.py#L597-L599 adding a part for delegating the validation/decode to...