Closed Michiel-s closed 3 years ago
Hi Michiel, thanks for your question. May I ask what version of the Schematron engine you are using? Pure, SCH or XSLT? Because that has an impact on the outcome :) Thanks, Philip
I’m not using the Pure engine, but not sure what you mean by SCH vs XSLT. I’m creating a new schematron resource with SchematronResourceSCH class. So I think the SCH engine then. But as far as I understood and see in the logs, this translates to xslt for the actual validation process.
Yes exactly - the SCH is converted to an XSLT and than applied onto the main XML to created SVRL. In that case I cannot help you, as this is basically the "default XSLT" from schematron.com (see https://github.com/Schematron/schematron ) I scanned the issues but couldn't find something.... Please open an issue there - okay?
Closing this, as there is unfortunately not much I can do here :(
@Michiel-s check my pr #111 for an example how to add allow-foreign
elements.
Thx. I'll look into it probably Monday. Thanks for mentioning me.
My SVRL output is currently this:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<schematron-output xmlns="http://purl.oclc.org/dsdl/svrl" schemaVersion="" title="">
<!--
-->
<active-pattern document="C:\dev\git\ph-schematron\ph-schematron\src\test\resources\issues\github101\test.xml" id="p1000101" name="Rule title" />
<fired-rule context="/doc/h1" fpi="BR-123" id="r1000101" />
<failed-assert flag="error" fpi="BR123-1" location="/doc[1]/h1[1]" see="#/rules/1000101" test="@a='b'">
<text>Some error message here</text>
</failed-assert>
<fired-rule context="/doc/h1" fpi="BR-123" id="r1000101" />
<fired-rule context="/doc/h1" fpi="BR-123" id="r1000101" />
<failed-assert flag="error" fpi="BR123-1" location="/doc[1]/h1[3]" see="#/rules/1000101" test="@a='b'">
<text>Some error message here</text>
</failed-assert>
</schematron-output>
it fails because attribute fpi
is not allowed in svrl:fired-rule
It should be working in the 6.0.0 version
@phax many thanks. Do you have any eta when 6.0.0 will be available?
No not really. I am splitting things into more modules and want to add schxslt as well - if this is done, v6 is free to be published
Version 6.0.0 is on it's way to Maven Central. Please see https://github.com/phax/ph-schematron/wiki/Migrations for details
Hi @phax,
First of all, thanks for this great schematron validation implementation.
I'm using version 5.6.0.
When I have e.g. the following rule set
The attribute
fpi
(both for rule and assert) andsee
are not returned in the svrl output:As you can see, the
id
andflag
attributes are there, but not thefpi
andsee
. They are part of the schematron and svrl specs and I also see some references to those attributes in your code.Is this a bug, feature or am I missing some config that I need to use.
Michiel