Schematron:issue with @subject
Posted: Wed Jun 20, 2018 12:45 pm
Hi,
I have created the following simplified test case:
When there exists only the second schematron check the error mesage will link with the context element "root" since the xpath within subject won't find anything - which is what I'd expect.
But when using the 1st assert as well the second error mesage will link to element2 (the subject from the previous rule) which seems to be a bug to me.
I noticed this behavior with oXygen 18.1.
Thanks and regards,
Patrik
I have created the following simplified test case:
Code: Select all
<root>
<element1>
<child/>
</element1>
<element2/>
</root>
Code: Select all
<sch:schema xmlns:sch="http://purl.oclc.org/dsdl/schematron" queryBinding="xslt2">
<sch:pattern>
<sch:rule context="root">
<sch:assert test="false()" subject="element2">Test1</sch:assert>
<sch:assert test="false()" subject="element1[1]/childxxx">Test2</sch:assert>
</sch:rule>
</sch:pattern>
</sch:schema>
But when using the 1st assert as well the second error mesage will link to element2 (the subject from the previous rule) which seems to be a bug to me.
I noticed this behavior with oXygen 18.1.
Thanks and regards,
Patrik