* More elements in XML schema

* A way to force conversion without downloading
This commit is contained in:
Stephane Bortzmeyer 2023-09-30 17:32:48 +02:00
parent 69a046ec88
commit 9bc5b62ca2
2 changed files with 38 additions and 35 deletions

View File

@ -53,8 +53,8 @@ if [ $? != 0 ]; then
cat ${OUTPUT} | mutt -s "Network error getting ${LTR_URL}" ${MAINTAINER}
exit 1
fi
if [ -e ${LTR_LOCAL}.TMP ]; then
#$CRLF_TO_LOCAL ${LTR_LOCAL}.TMP
if [ -e ${LTR_LOCAL}.TMP ] || [ ! -z "${LANGTAG_FORCE_CONVERT}" ]; then
if [ -e ${LTR_LOCAL}.TMP ]; then
${TEST_PROGRAM} ${LTR_LOCAL}.TMP 2>&1 >> ${OUTPUT}
if [ $? = 0 ]; then
if [ -e ${LTR_LOCAL} ]; then
@ -64,6 +64,11 @@ if [ -e ${LTR_LOCAL}.TMP ]; then
fi
fi
mv ${LTR_LOCAL}.TMP ${LTR_LOCAL}
else
cat ${OUTPUT} | mutt -s "Invalid registry ${LTR_URL} seen on ${ME}" ${MAINTAINER}
exit 1
fi
fi
# Now, the various conversions
${CONVERT_XML_BORTZMEYER}
# trang is in Java and therefore fails frequently
@ -84,10 +89,6 @@ if [ -e ${LTR_LOCAL}.TMP ]; then
version=`head -n 1 ${LTR_LOCAL} | awk '{print $2}'`
echo $version > ${LTR_LOCAL}-version
exit 0
else
cat ${OUTPUT} | mutt -s "Invalid registry ${LTR_URL} seen on ${ME}" ${MAINTAINER}
exit 1
fi
else # File not downloaded, probably because there was nothing new.
exit 0
fi

View File

@ -3,7 +3,7 @@
# Not standard in any way, just an individual proposal
# Stephane Bortzmeyer <bortzmeyer@nic.fr>
# Stephane Bortzmeyer <bortzmeyer@langtag.net>
# TODO: add Schematron rules for constraints such as "Records that
# contain a 'Preferred-Value' field MUST also have a 'Deprecated'
@ -46,7 +46,7 @@ redundants = redundant*
redundant = element redundant {tag & common}
common = added & descriptions & deprecated? & preferred-value?
common = added & descriptions & comments? & deprecated? & preferred-value?
added = element added {xsd:date}
@ -66,6 +66,8 @@ macrolanguage = element macrolanguage {text}
deprecated = element deprecated {xsd:date}
comments = element comments {text}
preferred-value = element preferred-value {text}
scope = element scope {text}