-
Notifications
You must be signed in to change notification settings - Fork 0
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
SVRL element for compilation and runtime errors #69
Comments
+1 for this. The standard characterizes a Schematron validator as a function returning three possibles values: "valid", "invalid", or "error" (Section 6.1). We currently have no way of expressing the value "error" in SVRL. The modified schema allows a SVRL error-element as child of the SVRL active-pattern element. However: An error might also occur outside an active pattern, e.g. while calculating the value of a variable.I would thus make the SVRL error element a child of SVRL schematron-output, not of active-pattern. |
I think it's still worth retaining it in the context of |
I think there are two different situations:
|
So I've changed the issue title. |
I'll add a mapping for |
This is a proposal to add a specific element to SVRL that implementers can use to convey compile-time and run-time errors in a Schematron schema.
E.g. we have rule with bad xpath <sch:assert id="a4" context="if (x = y) then 1 else">....
This would be allowed anywhere in SVRL, and is aimed at XPath and missing IDs reports.
It allows a Schematron implementation to take advantage of the newer XSLT try/catch blocks so that a programming error does not necessary cause a complete abort of the validation, and so that appropriate user-oriented messages can be generated rather than relying on the logging or exception-reporting chain (which often have no user-facing visibility and consequently no way to handle problems in-band by consuming applications in an XML pipeline. It allows all-XML pipelines.
It obviously allows run-time dynamic reporting of programming errors (e.g. for an XSLT engine that only reports XPath errors when they are evaluated) but it allows a runtime SVRL report to be generated even when loading and initializing the compiled program (e.g. for an XSLT engine that checks Xpaths at load-time.)
Indeed, an implementation could generate an SVRL report at compile time, reporting only the sch:problem elements.
For example, an implementation might do this:
Currently, an implementation might be struggling to know whether to use failed-assert or whatever, which might cause tag abuse.
The text was updated successfully, but these errors were encountered: