- Make the validate/lint target fail when Schematron validation gives output.

This is useful when running lint from upper directories. Otherwise,
  a validation error would not cause make to halt and an error could
  remain unspotted.
This commit is contained in:
Gabor Kovesdan 2013-03-15 07:49:33 +00:00
parent 53b00294cd
commit 96d2077fac
Notes: svn2git 2020-12-08 03:00:23 +00:00
svn path=/projects/xml-tools/; revision=41219

View file

@ -580,7 +580,11 @@ lint validate: ${SRCS} ${schxslts}
.if defined(schxslts)
@${ECHO} "==> Validating with Schematron constraints"
.for sch in ${schxslts}
@${XSLTPROC} ${sch} ${DOC}.parsed.xml
@( out=`${XSLTPROC} ${sch} ${DOC}.parsed.xml`; \
if [ -n "$${out}" ]; then \
echo "$${out}"; \
false; \
fi )
.endfor
.endif
@${RM} -rf ${CLEANFILES} ${CLEANDIRS} ${DOC}.parsed.xml