Open jkiddo opened 7 years ago
Currently on vacation so only a quick answer.please try v5.0.0-b1 and give me feedback please. Thx
Looks like the same to me using v5.0.0-b1
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
I enabled a flag in the Saxon runtime - maybe the makes things a bit better.
Hi ! I'm also interested in this feature (ie at least line number) on errors. But I'm not sure to understand what we (ph-schematron users) should code to have this information?
I'm using the following code to collect schematron errors:
StreamSource source = new StreamSource(new StringInputStream(xml, StandardCharsets.UTF_8));
SchematronOutputType ouput = sch.applySchematronValidationToSVRL(source);
final ICommonsList<SVRLFailedAssert> failedAssertions = SVRLHelper.getAllFailedAssertions(ouput);
Could you please provide an explanation or code snippet on how to read the "location" information ? Thanks
Hi, the problem with the line numbers is mainly for the internal conversion of SCH to XSLT.
In what exact context to do you expect line numbers?
In the created SVRL there is no option to get the line number of the respective XML - that's why you have the XPath expression.
Please elaborate a bit more - thx
Hi, here is what I want: I want the error lines number when I validate a XML content against a schematron. Maybe I'm not using the correct API to do this.
Unfortunately SVRL, the output language for Schematron validation, does not foresee the provision of line and column numbers for matching elements. So unfortunately there is no standard way to provide this - sorry
Do we have another ways to have these line/column information ?
Well I am not aware of a simple solution to do it. Evtl. you can use this method with some value-of
assertion elements, but I never used it...
If the name of the file in question could be part of the stacktrace or the failed expression could be part of the trace it would be great. (The file 'schema.sch' is only the container for a lot of other files).