Schematron:issue with @subject

This should cover W3C XML Schema, Relax NG and DTD related problems.
Posts: 228
Location: Hamburg/Germany

Schematron:issue with @subject

Wed Jun 20, 2018 12:45 pm


I have created the following simplified test case:

Code: Select all


Code: Select all

<sch:schema xmlns:sch="" queryBinding="xslt2">
        <sch:rule context="root">
           <sch:assert test="false()" subject="element2">Test1</sch:assert>
           <sch:assert test="false()" subject="element1[1]/childxxx">Test2</sch:assert>

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,
Posts: 169

Re: Schematron:issue with @subject

Wed Jun 20, 2018 2:46 pm

Hi Patrik,

Yes, this seems to be a problem. The location of the context item should be used if the xpath value from the subject attribute won't find anything. I added an issue on out issue tracker for this.
Thanks for your feedback.

Best Regards,
Octavian Nadolu
<oXygen/> XML Editor
Site Admin
Posts: 192

Re: Schematron:issue with @subject

Mon Feb 25, 2019 4:39 pm

Hello Patrik,

Just wanted to let you know that this issue has been fixed in oXygen 21, which was released on Friday.

All the best wishes,
Sorin Carbunaru
oXygen XML

Return to “XML Schemas”

Who is online

Users browsing this forum: No registered users and 1 guest