Open rkoberg opened 9 years ago
We would accept a patch for this. I'm not sure when once of us will get to it. I would suggest the following things.
ValidateXsd
Validate
method so there's no duplication.I'm not sure if the boolean arg should default to false so that schema documents aren't validated by default. This would be a significant compatibility change and I'm not sure how it will affect existing programs.
It would be nice to do this same work for the RelaxNG versions of these functions. But maybe that'll be a separate pull request.
Yea, I could do java, but I don't have have knowledge of the C. I can confirm that the current state of the code dies when doing 10s of thousands of validations.
Learning new things is important. :)
You should at least be able to add the boolean argument that will get you past your current problem. I'm just saying we may not get to a complete fix for this soon.
On Sun Jan 18 2015 at 7:15:59 PM Rob Koberg notifications@github.com wrote:
Yea, I could do java, but I don't have have knowledge of the C. I can confirm that the current state of the code dies when doing 10s of thousands of validations.
— Reply to this email directly or view it on GitHub https://github.com/polotek/libxmljs/issues/276#issuecomment-70433720.
I am trying to validate over 56,000 mathml snippets. From the code, each call to validate tries to validate the very large mathml2 xml schema.
Could there be a new function like parseXsdString that validates the schema once, and then calls to validate rely on that being done. Or, for backwards compatibility:
where the second arg is telling validate that the xsd has already been validated.
I am asking because, for some reason, after my script made it through several thousand validations, it stopped with the error and I am hoping the above could fix(??):
Not sure why it would so many other validations. However, there should be no need to validate the schema on each XML validation.