-
Notifications
You must be signed in to change notification settings - Fork 36
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
Role is not returned when a rule is fired #54
Comments
I had a |
Hmm... I built the latest and changed my pom file to reference 5.0.0-SNAPSHOT. When I get back a SuccessfulReport object, the role is still null. Can you send me a rule that has a role that works? |
The problem is - I don't have an example. Can you please send me yours - I of course handle it confidentially. |
See the example file in the above commit. <?xml version="1.0" encoding="UTF-8"?>
<schematron-output xmlns="http://purl.oclc.org/dsdl/svrl" title="" schemaVersion="">
<active-pattern id="sampleValidation" name="sampleValidation" document="" />
<fired-rule context="CCC" role="abc" />
<fired-rule context="CCC" role="abc" />
<failed-assert location="/simple[1]/CCC[2]" test="A and B">
<text>A and B must be present</text>
</failed-assert>
<fired-rule context="CCC" role="abc" />
<failed-assert location="/simple[1]/CCC[3]" test="A and B">
<text>A and B must be present</text>
</failed-assert>
</schematron-output> it is located in the Schematron like this: <sch:rule context="CCC" role="abc">
<sch:assert test="A and B">A and B must be present</sch:assert>
</sch:rule> When using the "pure" version for parsing, you need to wait for v5.0.0 for it to work. When using the regular Schematron/XSLT approach, this should also work for v4.x. hth |
Thanks Philip! I have it working.
…On Mon, Oct 30, 2017 at 2:32 AM, Philip Helger ***@***.***> wrote:
See the example file in the above commit.
The output looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<schematron-output xmlns="http://purl.oclc.org/dsdl/svrl" title="" schemaVersion="">
<active-pattern id="sampleValidation" name="sampleValidation" document="" />
<fired-rule context="CCC" role="abc" />
<fired-rule context="CCC" role="abc" />
<failed-assert location="/simple[1]/CCC[2]" test="A and B">
<text>A and B must be present</text>
</failed-assert>
<fired-rule context="CCC" role="abc" />
<failed-assert location="/simple[1]/CCC[3]" test="A and B">
<text>A and B must be present</text>
</failed-assert>
</schematron-output>
it is located in the Schematron like this:
<sch:rule context="CCC" role="abc">
<sch:assert test="A and B">A and B must be present</sch:assert>
</sch:rule>
When using the "pure" version for parsing, you need to wait for v5.0.0 for
it to work. When using the regular Schematron/XSLT approach, this should
also work for v4.x. hth
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#54 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AC2l1CWe_KGUtfhkMsvrhJxHwZF3guNPks5sxZevgaJpZM4QBHRC>
.
|
I have created a rule that is fired, but when I get back the FiredRule or the SuccessfulReport, the role value is null.
My rule looks like this:
metadata/description element is missing and is a required field.
I tried putting it in the rule and also in the report, but neither work.
The text was updated successfully, but these errors were encountered: