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

Lacking support of Schematron diagnostics element / diagnostic messages #621

Open
ingofrank opened this issue Sep 5, 2023 · 0 comments
Open
Assignees

Comments

@ingofrank
Copy link

ingofrank commented Sep 5, 2023

The XSLT script extract-isosch.xsl (see https://github.com/TEIC/Stylesheets/tree/dev/odds) extracts diagnostics elements, but does not arrange diagnostics elements according to the sequence defined in the Schematron RELAX NG schema. In addition to that, in case of several diagnostics elements distributed throughout the ODD, the diagnostics elements are not merged into one diagnostics element as it would be required according to the RELAX NG schema.

According to the RELAX NG schema for the IOS Schematron standard, the (optional) disgnostics element must follow after the pattern element(s) in the Schematron schema file.

See excerpt from https://github.com/Schematron/schema/blob/main/schematron.rnc:

schema =
    element schema {
        attribute id { xsd:ID }?,
        rich,
        attribute schemaVersion { non-empty-string }?,
        attribute defaultPhase { xsd:IDREF }?,
        attribute queryBinding { non-empty-string }?,
        (foreign
         & inclusion*
         & (title?, ns*, p*, let*, phase*, pattern+, p*, diagnostics?, properties?))
    }

The ODD transformation stylesheets do not support the Schematron diagnostics element and thus the correct sequence of pattern elements followed by the (optional) diagnostics element is not provided: i.e. diagnostic messages that were inserted manually into the ODD file (in addition to Schematron patterns within constraint elements) are not extracted and arranged in the right order by the XSLT script extract-isosch.xsl. The XSLT stylesheet extract-sch.xsl does not extract diagnostics elements at all.

Any existing diagnostics entries extracted from the ODD's constraint elements would have to be merged into a single diagnostics block with all occurring diagnostic messages following the last pattern element in the generated Schematron schema file.

In order to avoid these problems, Schematron diagnostic messages should also be supported in the Roma editor: https://github.com/TEIC/romajs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants