@@ -106,12 +106,10 @@ detest: checkrnv
106
106
@echo " "
107
107
@echo " --------- work on target $@ ---------"
108
108
@echo BUILD: Test file with deliberate mistakes
109
- # Note that output below is called 'detest_odd_schematron' even though
110
- # detest.xml is validated against both RelaxNG and Schematron, because
111
- # if there is a RelaxNG error the build dies and there is no output at
112
- # all. (So if there is any output, it is Schematron messages.)
113
109
@echo " --- run ant to validate ODD file (./detest.odd) against p5odds.rng & p5odds.isosch:"
114
110
$(ANT ) -f antruntest.xml -Doutputname=detest -DoddFile=detest.odd validateodd > detest_odd_schematron.log 2>&1
111
+ # If a RELAX NG error is found by the above cmd, it dies, and this (the "detest") target fails.
112
+ # Any Schematron errors that are found are written to detest_odd_schematron.svrl.
115
113
@echo "--- run ant to compile ODD file into RelaxNG and Schematron (detest.odd → detest.rng & detest.isosch):"
116
114
$(ANT) -f antruntest.xml -Doutputname=detest -DoddFile=detest.odd compileodd rng isoschematron
117
115
@echo "--- convert RelaxNG to compact syntax with trang (./detest.rng → ./detest.rnc):"
@@ -129,9 +127,8 @@ detest: checkrnv
129
127
# The log file contains some lines (like "Processing…" and "Loading…") that include filepaths that are different
130
128
# when executed in different environments (like the Travis server, e.g.). Thus rather than comparing the files
131
129
# directly, we delete those lines first, and compare the results of deletions.
132
- bash -c "diff -C0 -bBw \
133
- <(grep -F '[xslt]' expected-results/detest_odd_schematron.log | grep -Ev 'xslt\] Processing.*detest.odd|xslt\] Loading.*.isosch.xsl') \
134
- <(grep -F '[xslt]' ./detest_odd_schematron.log | grep -Ev 'xslt\] Processing.*detest.odd|xslt\] Loading.*.isosch.xsl')"
130
+ bash -c "diff -C0 -bBw <(grep -vF 'dct:created' expected-results/detest_odd_schematron.svrl) \
131
+ <(grep -vF 'dct :created' ./detest_odd_schematron.svrl)"
135
132
136
133
clean :
137
134
@echo " "
0 commit comments