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

Report on shadowed rules #58

Closed
dmj opened this issue Jun 7, 2019 · 3 comments
Labels
Milestone

Comments

@dmj
Copy link
Member

@dmj dmj commented Jun 7, 2019

As per 2016 version of ISO Schematron 6.5 "Order and side-effects" it is mandated that "a rule element acts as an if-then-else-statement". Subsequently once a context node had been matched by a rule, it cannot be matched by a following rule in the same pattern.

It would be helpful if SchXslt could report on rules that are shadowed.

@dmj dmj added the enhancement label Jun 7, 2019
@dmj

This comment has been minimized.

Copy link
Member Author

@dmj dmj commented Jun 7, 2019

First idea: Have an option for the compiler that enables or disables generating the respective code. If enabled, the validation stylesheet uses xsl:message to report.

Alternative reporting mechanisms:

  • xsl:comment()
  • xsl:processing-instruction()
  • custom element schxslt-report:shadowed-rule context="..."

The benefit of comment, pi, or custom element is, that they could be placed below the svrl:fired-rule that machted the context. The drawback of custom element is, that the result won't be a valid SVRL.

@dmj dmj added this to the Release 1.3 milestone Jun 8, 2019
@dmj

This comment has been minimized.

Copy link
Member Author

@dmj dmj commented Jul 12, 2019

Current master reports a shadowed rule via xsl:message and via comment in the report document.

@dmj

This comment has been minimized.

Copy link
Member Author

@dmj dmj commented Jul 30, 2019

Fixed in master

@dmj dmj closed this Jul 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.