Schematron and Oxygen 22.0
Posted: Tue Apr 07, 2020 4:13 pm
Hi
I've just started with ODD containing some elementary Schematron, generating a Relax NG XML file for validation of our TEI/XML files. For four members of our team the schema seems to work fine, but for one colleague, two rules in particular fire wrongly or fail to fire. We haven't spotted any difference in settings, but she's on vsn 22.0, while we're all on 21.1.
The prologue and start of the ODD file looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<TEI xmlns="http://www.tei-c.org/ns/1.0" xmlns:rng="http://relaxng.org/ns/structure/1.0" xml:lang="en" xmlns:sch="http://purl.oclc.org/dsdl/schematron">
<teiHeader>
...
The misfiring rules look like this:
<elementSpec ident="p" module="core" mode="change">
<constraintSpec ident="header" scheme="schematron">
<constraint>
<sch:report test=".[@*]/ancestor::tei:teiHeader" role="error">A paragraph <p> in the header must not have any attributes.</sch:report>
<sch:report test=".[not(@rend)]/ancestor::tei:text" role="error">A paragraph <p> in the text portion must have the attribute rend.</sch:report>
<sch:report test="not(@rend='inline') and ./preceding-sibling::tei:label" role="warning">When the content of a postscript follows the 'P.S.' label on the same line, its obligatory <p> would normally have @rend with value "inline".</sch:report>
</constraint>
</constraintSpec>
...
</elementSpec>
Of the three reports for <p>, the first throws an error for the colleague on 22.0 for every paragraph in the teiHeader, even though all are correctly written without an attribute; the second doesn't fire and allows <p> with or without @rend; while the third works as intended. All the other Schematron rules work fine for her as for us.
Any ideas where to look? Does the ODD need changing, or is there a setting in Oxygen we need to look at? Thanks for any help.
best
David
I've just started with ODD containing some elementary Schematron, generating a Relax NG XML file for validation of our TEI/XML files. For four members of our team the schema seems to work fine, but for one colleague, two rules in particular fire wrongly or fail to fire. We haven't spotted any difference in settings, but she's on vsn 22.0, while we're all on 21.1.
The prologue and start of the ODD file looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<TEI xmlns="http://www.tei-c.org/ns/1.0" xmlns:rng="http://relaxng.org/ns/structure/1.0" xml:lang="en" xmlns:sch="http://purl.oclc.org/dsdl/schematron">
<teiHeader>
...
The misfiring rules look like this:
<elementSpec ident="p" module="core" mode="change">
<constraintSpec ident="header" scheme="schematron">
<constraint>
<sch:report test=".[@*]/ancestor::tei:teiHeader" role="error">A paragraph <p> in the header must not have any attributes.</sch:report>
<sch:report test=".[not(@rend)]/ancestor::tei:text" role="error">A paragraph <p> in the text portion must have the attribute rend.</sch:report>
<sch:report test="not(@rend='inline') and ./preceding-sibling::tei:label" role="warning">When the content of a postscript follows the 'P.S.' label on the same line, its obligatory <p> would normally have @rend with value "inline".</sch:report>
</constraint>
</constraintSpec>
...
</elementSpec>
Of the three reports for <p>, the first throws an error for the colleague on 22.0 for every paragraph in the teiHeader, even though all are correctly written without an attribute; the second doesn't fire and allows <p> with or without @rend; while the third works as intended. All the other Schematron rules work fine for her as for us.
Any ideas where to look? Does the ODD need changing, or is there a setting in Oxygen we need to look at? Thanks for any help.
best
David