lestrrat-go / libxml2

Interface to libxml2, with DOM interface
MIT License
230 stars 55 forks source link

[Regression] Default values from XSD causes validation to fail #82

Closed johnnybubonic closed 2 years ago

johnnybubonic commented 2 years ago

So first off, thanks again for fixing #65 by implementing #66 .

However, it seems at some point this broke. I persistently get schema validation failed but am unable to reproduce this with either xmllint nor python-lxml; both report not only a valid schema but a pass for schema validation on the document.

This issue only occurs when parsing and replacing default values from an XSD.

I have attached a zip for a PoC: poc.zip

lestrrat commented 2 years ago

Are you saying that it used to work at one point? I don't see any changes in the last two years on my side :/

TBH ATM I don't have much motivation or time to work on this, PRs are welcome!

johnnybubonic commented 2 years ago

Are you saying that it used to work at one point? I don't see any changes in the last two years on my side :/

I haven't used it in a couple of years. So presumably sometime between now and when #66 was merged...

TBH ATM I don't have much motivation or time to work on this, PRs are welcome!

Ah, shame. Your library fills in a lot of gaps that stdlib's encoding/xml has! If I bump into the root cause for this I'll submit a PR.

johnnybubonic commented 2 years ago

You know... I'm not sure why, but this seems to be working fine now after I did some refactoring? Closing this as I'm now positive I was doing a dumb. :)