mysterious new validation error in ODD-generated Relax NG XML schema

Dear oXygen list, I generated a schema in Relax NG XML syntax from a TEI ODD file some weeks ago, on May 6, and the schema behaved as I expected it to. It is posted on my GitHub repo and shared with my project team, and other members of my team worked with it in the past few weeks. I have not edited the schema that my team using since that date. Today one of my team members alerted me that she was seeing a strange error, and I confirmed locally that this is on the Relax NG schema. The error reads: Description Effective boolean value is not defined for a sequence of two or more items starting with a boolean Severity Fatal System ID https://digitalmitford.github.io/DM_documentation/MitfordODD/out/mitfordODD.... Main validation file /Users/elisa/Downloads/OVWalksInTheCountryTHECOWSLIPBALL.xml <http://users/elisa/Downloads/OVWalksInTheCountryTHECOWSLIPBALL.xml> Engine name ISO Schematron Start location line: 4996, column: 0 Here is another wrinkle to the problem. In attempting to debug, I generated a new RNG schema from the source ODD to see if that would make a difference. Interestingly, it did, with this effect: On attempting to validate a project XML file, I saw the same message about the effective boolean value, only this time it pointed to a different line in the RNG (not 4996, but 5151). In neither of these cases was the code on these lines at all meaningful or related to the reported ISO Schematron error. Line 4996 is the blank line below after defining the element binaryObject. <define name="teibinaryObject"> <element name="binaryObject"> <text/> <ref name="teiatt.global.attributes"/> <ref name="teiatt.media.attributes"/> <ref name="teiatt.timed.attributes"/> <ref name="teiatt.typed.attributes"/> ... </define> The other line was similarly not about making a boolean test of any kind. I do not understand what could be causing these problems, particularly since the schema was behaving normally two weeks ago. I cannot seem to generate a working schema now due to this strange ISO-Schematron error that keeps flagging different lines of my Relax NG document. Here is a copy of my schema, which I link here from my GitHub repo: https://raw.githubusercontent.com/DigitalMitford/DM_documentation/master/Mit... And here is a project XML file associated with that schema: https://raw.githubusercontent.com/DigitalMitford/DM_documentation/master/mrm... I hope someone on this list can help! I don't think this is a problem with my ODD or with ODD processing, but with something that is firing ISO-Schematron over my RNG schema, which is expressed in XML syntax. The strangeness of this prompted me to write to this list instead of to the TEI. Thanks, Elisa -- Elisa Beshero-Bondar, PhD Associate Professor of English University of Pittsburgh at Greensburg Humanities Division 150 Finoli Drive Greensburg, PA 15601 USA E-mail: ebb8@pitt.edu

Hi Elisa, interesting case! I just had a look at the provided files and indeed the schema seems to be alright. Yet, the project file shows anomalies that the schema does not handle well: whitespaces in @ref attributes (see lines 149 and 340). Best Peter
Am 16.05.2019 um 08:38 schrieb Elisa Beshero-Bondar <ebbondar@gmail.com>:
Dear oXygen list, I generated a schema in Relax NG XML syntax from a TEI ODD file some weeks ago, on May 6, and the schema behaved as I expected it to. It is posted on my GitHub repo and shared with my project team, and other members of my team worked with it in the past few weeks. I have not edited the schema that my team using since that date.
Today one of my team members alerted me that she was seeing a strange error, and I confirmed locally that this is on the Relax NG schema. The error reads: Description Effective boolean value is not defined for a sequence of two or more items starting with a boolean Severity Fatal System ID https://digitalmitford.github.io/DM_documentation/MitfordODD/out/mitfordODD.... Main validation file /Users/elisa/Downloads/OVWalksInTheCountryTHECOWSLIPBALL.xml Engine name ISO Schematron Start location line: 4996, column: 0
Here is another wrinkle to the problem. In attempting to debug, I generated a new RNG schema from the source ODD to see if that would make a difference. Interestingly, it did, with this effect: On attempting to validate a project XML file, I saw the same message about the effective boolean value, only this time it pointed to a different line in the RNG (not 4996, but 5151). In neither of these cases was the code on these lines at all meaningful or related to the reported ISO Schematron error. Line 4996 is the blank line below after defining the element binaryObject. <define name="teibinaryObject"> <element name="binaryObject">
<text/> <ref name="teiatt.global.attributes"/> <ref name="teiatt.media.attributes"/> <ref name="teiatt.timed.attributes"/> <ref name="teiatt.typed.attributes"/> ... </define>
The other line was similarly not about making a boolean test of any kind.
I do not understand what could be causing these problems, particularly since the schema was behaving normally two weeks ago. I cannot seem to generate a working schema now due to this strange ISO-Schematron error that keeps flagging different lines of my Relax NG document.
Here is a copy of my schema, which I link here from my GitHub repo: https://raw.githubusercontent.com/DigitalMitford/DM_documentation/master/Mit...
And here is a project XML file associated with that schema: https://raw.githubusercontent.com/DigitalMitford/DM_documentation/master/mrm...
I hope someone on this list can help! I don't think this is a problem with my ODD or with ODD processing, but with something that is firing ISO-Schematron over my RNG schema, which is expressed in XML syntax. The strangeness of this prompted me to write to this list instead of to the TEI.
Thanks, Elisa
-- Elisa Beshero-Bondar, PhD Associate Professor of English University of Pittsburgh at Greensburg Humanities Division 150 Finoli Drive Greensburg, PA 15601 USA E-mail: ebb8@pitt.edu _______________________________________________ oXygen-user mailing list oXygen-user@oxygenxml.com https://www.oxygenxml.com/mailman/listinfo/oxygen-user
-- Peter Stadler Carl-Maria-von-Weber-Gesamtausgabe Arbeitsstelle Detmold Hornsche Str. 39 D-32756 Detmold Tel. +49 5231 975-676 Fax: +49 5231 975-668 stadler at weber-gesamtausgabe.de www.weber-gesamtausgabe.de

On 16.5.2019 8:38, Elisa Beshero-Bondar wrote:
Engine name ISO Schematron Start location line: 4996, column: 0
Hi Elisa, I suppose that oXygen points you to a wrong location as internaly it has to extract Schematron from RELAX NG file, then compile it to XSLT and then finally XSLT is run over your XML. oXygen probably can't track error from XSLT back to Schematron and then back to RELAX NG file (it would be very hard to do so.) Problem is in few of your expressions. If you change <sch:report role="info" test="$backRefs"> to <sch:report role="info" test="not(empty($backRefs))"> <sch:report role="info" test="$backRefs and not($siRefs)"> to <sch:report role="info" test="not(empty($backRefs)) and empty($siRefs)"> <sch:report role="warning" test="not($backRefs) and not($siRefs)"> to <sch:report role="warning" test="empty($backRefs) and empty($siRefs)"> ie. using empty() to check for empty sequence, your validation should be working again. Jirka -- ------------------------------------------------------------------ Jirka Kosek e-mail: jirka@kosek.cz http://xmlguru.cz ------------------------------------------------------------------ Professional XML and Web consulting and training services DocBook/DITA customization, custom XSLT/XSL-FO document processing ------------------------------------------------------------------ Bringing you XML Prague conference http://xmlprague.cz ------------------------------------------------------------------

Many thanks to Jirka and Peter for their replies, which precisely identified the problem with my ODD's Schematron rules testing sequences of values. Jirka, thanks also for explaining why the error messages seemed so random! I've implemented the changes each of you suggested and the schema is validating properly now. Cheers, Elisa On Thu, May 16, 2019 at 5:24 AM Jirka Kosek <jirka@kosek.cz> wrote:
On 16.5.2019 8:38, Elisa Beshero-Bondar wrote:
Engine name ISO Schematron Start location line: 4996, column: 0
Hi Elisa,
I suppose that oXygen points you to a wrong location as internaly it has to extract Schematron from RELAX NG file, then compile it to XSLT and then finally XSLT is run over your XML. oXygen probably can't track error from XSLT back to Schematron and then back to RELAX NG file (it would be very hard to do so.)
Problem is in few of your expressions. If you change
<sch:report role="info" test="$backRefs"> to <sch:report role="info" test="not(empty($backRefs))">
<sch:report role="info" test="$backRefs and not($siRefs)"> to <sch:report role="info" test="not(empty($backRefs)) and empty($siRefs)">
<sch:report role="warning" test="not($backRefs) and not($siRefs)"> to <sch:report role="warning" test="empty($backRefs) and empty($siRefs)">
ie. using empty() to check for empty sequence, your validation should be working again.
Jirka
-- ------------------------------------------------------------------ Jirka Kosek e-mail: jirka@kosek.cz http://xmlguru.cz ------------------------------------------------------------------ Professional XML and Web consulting and training services DocBook/DITA customization, custom XSLT/XSL-FO document processing ------------------------------------------------------------------ Bringing you XML Prague conference http://xmlprague.cz ------------------------------------------------------------------
-- Elisa Beshero-Bondar, PhD Associate Professor of English University of Pittsburgh at Greensburg Humanities Division 150 Finoli Drive Greensburg, PA 15601 USA E-mail: ebb8@pitt.edu
participants (3)
-
Elisa Beshero-Bondar
-
Jirka Kosek
-
Peter Stadler