Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

isoschematron.Schematron constructor now accepts a Xpath object as validation_errors param #161

Merged
merged 1 commit into from
Feb 28, 2015

Conversation

numshub
Copy link
Contributor

@numshub numshub commented Feb 27, 2015

Yesterday version was a bit on a rush. I also read Holger's suggestion and went back to give it a try in a proper way.

Now Schematron can be customized in two ways:

  • simple customization via the validation_errors param to set a custom XPath object
  • complete customization via traditional subclassing

Schematron.FAIL_ON_ASSERT_ONLY and Schematron.FAIL_ON_ASSERT_AND_REPORT are there as shortcuts to the relevant XPath objects.

This implementation goes well with the old code for both the default behavior and subclassing approach.

parameters to customize failing behaviour.
Standard behaviour is unchanged to keep full backward compatibility.
Implementation is also safe in case of complete customization via
subclassing Schematron.

Docstring and tests updated.
@scoder
Copy link
Member

scoder commented Feb 28, 2015

looks good to me, too.

scoder added a commit that referenced this pull request Feb 28, 2015
isoschematron.Schematron constructor now accepts a Xpath object as validation_errors param
@scoder scoder merged commit 996fd84 into lxml:master Feb 28, 2015
@scoder
Copy link
Member

scoder commented Feb 28, 2015

f0e2a42

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants