From 63d99d818415baec5fe3014c49844a6d920a8cf4 Mon Sep 17 00:00:00 2001 From: Syd Bauman Date: Sun, 6 Aug 2023 14:29:57 -0400 Subject: [PATCH 1/2] Address #2261 as follows: * Made scheme= of constraintSpec optional (per closed schema) * Made scheme= of constraintSpec required iff mode=add (default) or mode=replace * Moved declarations of Schematron namespaces from constraintSpec to TEI in order to make above work * Added a case in detest.odd to test new constraints --- P5/Source/Specs/TEI.xml | 6 ++++ P5/Source/Specs/constraintSpec.xml | 36 ++++++++++++++----- P5/Test/detest.odd | 19 ++++++++++ .../detest_odd_schematron.log | 20 +++++++---- 4 files changed, 66 insertions(+), 15 deletions(-) diff --git a/P5/Source/Specs/TEI.xml b/P5/Source/Specs/TEI.xml index e6daa53258..a0fe94201b 100644 --- a/P5/Source/Specs/TEI.xml +++ b/P5/Source/Specs/TEI.xml @@ -62,6 +62,12 @@ $Id$ + + + + + + specifies the version number of the TEI Guidelines against diff --git a/P5/Source/Specs/constraintSpec.xml b/P5/Source/Specs/constraintSpec.xml index 04455bddd5..5acc1a8cbf 100644 --- a/P5/Source/Specs/constraintSpec.xml +++ b/P5/Source/Specs/constraintSpec.xml @@ -48,8 +48,7 @@ $Id$ Relationship between scheme attribute and contents: Schematron 1.x - - Rules + Rules in the Schematron 1.* language must be inside a constraintSpec with a value other than 'schematron' or 'isoschematron' on the scheme attribute @@ -58,15 +57,15 @@ $Id$ Relationship between scheme attribute and contents: ISO Schematron - - Rules - in the ISO Schematron language must be inside a constraintSpec - with the value 'schematron' on the scheme attribute + + Rules + in the ISO Schematron language must be inside a constraintSpec + with the value 'schematron' on the scheme attribute + - An ISO Schematron constraint specification for a macro should not have an 'assert' or 'report' element without a parent 'rule' element @@ -84,21 +83,40 @@ $Id$ - + + supplies the name of the language in which the constraints are defined + + + + The @scheme attribute of <constraintSpec> is required when the @mode is . + + + ISO Schematron - +

These Guidelines no longer recommend, and the current TEI stylesheets no longer support, the use of Schematron 1.x within constraintSpec. Thus the value schematron is used to indicate that ISO Schematron is used within the constraintSpec.

+

The scheme attribute is required when the value + of mode is add or + replace. The scheme attribute is + permitted when the value of mode is + delete, but these Guidelines make no reccomendation + for what a processor should do if its value does not match + that of the constraintSpec being deleted.

diff --git a/P5/Test/detest.odd b/P5/Test/detest.odd index 166a5ff372..ed347586ac 100644 --- a/P5/Test/detest.odd +++ b/P5/Test/detest.odd @@ -17,6 +17,11 @@ + + Add the add_missing_scheme and + replace_missing_scheme tests for + constraintSpec. + Tweaked some comments and wording of content @@ -437,6 +442,20 @@ + + This constraintSpec is invalid because it is + missing scheme in add mode. + + This rule never fires. + + + + This constraintSpec is invalid because it is + missing scheme in replace mode. + + This rule never fires. + +