Skip to content
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

Attribute @subject not used for location in SVRL result #133

Closed
ericlop opened this issue Aug 30, 2022 · 4 comments
Closed

Attribute @subject not used for location in SVRL result #133

ericlop opened this issue Aug 30, 2022 · 4 comments
Assignees

Comments

@ericlop
Copy link

ericlop commented Aug 30, 2022

In case of presence, attribute @subject from schematron rule should be used in the SVRL Result instead of context path in the attribute @location . Otherwise, the XML node(s) or attribute(s) which is(are) the cause of the error/warning cannot be retrieved precisely

To be also in compliance with mapping defined in schematron page : https://schematron.com/document/3464.html

Thx,

@ericlop ericlop changed the title "subject" not used for location in SVRL result Attribute @subject not used for location in SVRL result Aug 30, 2022
@phax phax self-assigned this Aug 30, 2022
@phax
Copy link
Owner

phax commented Aug 30, 2022

Thanks for the proposal.
What "Engine" are you using?

  • Java "pure"
  • XSLT (ISO Schematron based)
  • XSLT (SchXslt based)

And can you eventually provide a small demo SCH with the usage of this attribute?

@ericlop
Copy link
Author

ericlop commented Sep 1, 2022

Hello Philip,
We're using java "pure".

Our need is to be able to specify one or several node(s)/attributes from context path in a single "subject"/"location". For example, a range of values for which the maximum cannot be less than the minimum :

<rule context="/path/ValueRange">
        <assert id="XXX" subject="@min @max" test="not(@min) or not(@max) or number(@min) &lt;= number(@max)"
                role="ERROR">
               min-max error
        </assert>
    </rule>

If the 2nd ValueRange node in /path does not check this rule, we expect in SVRL result to specify both attributes which cause the assertion failure :

    <failed-assert id="XXX" location="/path/ValueRange[1]/@min /path/ValueRange[1]/@max" test="not(@min) or not(@max) or number(@min) &lt;= number(@max)" role="ERROR">
        <text>
           min-max error
        </text>

Thx,
Eric

Copy link

stale bot commented Jan 7, 2024

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.

@stale stale bot added the wontfix label Jan 7, 2024
@phax phax added pinned and removed wontfix labels Jan 8, 2024
@phax
Copy link
Owner

phax commented Mar 9, 2024

This is finally contained in v8.0.0

@phax phax closed this as completed Mar 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants