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

Language tag of a diagnostic is not preserved in SVRL output #82

Closed
dmj opened this issue Aug 6, 2019 · 4 comments
Closed

Language tag of a diagnostic is not preserved in SVRL output #82

dmj opened this issue Aug 6, 2019 · 4 comments
Assignees
Labels

Comments

@dmj
Copy link

dmj commented Aug 6, 2019

Using the following Schematron:

<sch:schema>
  <sch:pattern>
    <sch:rule context="/">
      <sch:report test="true()" diagnostics="d1"/>
    </sch:rule>
  </sch:pattern>
  <sch:diagnostics>
    <sch:diagnostic id="d1" xml:lang="de">Foobar</sch:diagnostic>
  </sch:diagnostics>
</sch:schema>

I expect the SVRL to contain a svrl:successful-report with a svrl:diagnostic-reference that contains a svrl:text element with the @‍xml:lang set to 'de'.

But with ph-schematron 5.2.0 I get:

<schematron-output xmlns="http://purl.oclc.org/dsdl/svrl">
  <active-pattern/>
  <fired-rule context="/"/>
  <successful-report location="#document" test="true()">
    <diagnostic-reference diagnostic="d1">
      <text>Foobar</text>
    </diagnostic-reference>
    <text/>
  </successful-report>
</schematron-output>

This was discovered with running ph-schematron 5.2.0 against a in-progress schematron testsuite. The complete test results are shown here.

@phax phax self-assigned this Aug 6, 2019
@phax phax added the bug label Aug 6, 2019
@phax
Copy link
Owner

phax commented Aug 6, 2019

Hi @dmj
can you please elaborate (and this holds true for all issues you reported), how you performed the validation? Using the XSLT or using "Pure" mode? Since pure mode only handles XPath and not XSLT, all the "document-uri" functions etc. are not working.
Thanks,

@dmj
Copy link
Author

dmj commented Aug 6, 2019

Sorry, forgot that. I am using the "Pure" mode and took care to only use XPath-functions in the tests. All tests for the xpath2 query binding are found here:

https://github.com/schxslt/schxslt-testsuite/tree/master/testsuite/tests/xpath2

For every test there is a testcase description (.xml) and a schematron (.sch). The testcase description references the primary instance document and the expected result.

This one (diagnostics in SVRL) is marked as optional because SVRL is no normative part of the Schematron spec.

@stale
Copy link

stale bot commented Nov 4, 2019

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 Nov 4, 2019
@phax phax added pinned and removed wontfix labels Nov 4, 2019
@phax
Copy link
Owner

phax commented Dec 4, 2020

With my change of #85 the xml:lang attribute is now also maintained in the diagnostic-reference. Will be part of the 6.0.2 release.

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

No branches or pull requests

2 participants