From 47dd5d3b624c0e1155a27d0596e8a632df680745 Mon Sep 17 00:00:00 2001 From: "Gerber, Mike" Date: Mon, 30 Sep 2019 18:25:54 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20Move=20XML=20schemata=20to=20a?= =?UTF-8?q?=20better=20path?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 2 +- my_ocrd_workflow | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index dd9a73c..9e536f5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -54,7 +54,7 @@ COPY requirements.txt /tmp RUN pip3 install --no-cache-dir -r /tmp/requirements.txt COPY my_ocrd_workflow /usr/bin -COPY xsd /usr/bin/xsd +COPY xsd/* /usr/share/xml/ WORKDIR /data CMD ["/usr/bin/my_ocrd_workflow"] diff --git a/my_ocrd_workflow b/my_ocrd_workflow index 944ce23..aa46b52 100755 --- a/my_ocrd_workflow +++ b/my_ocrd_workflow @@ -101,7 +101,11 @@ page_validate_xml() { local file for file in `ocrd workspace find -G $filegrp`; do - xmllint --noout --schema `dirname $0`/xsd/pagecontent.2019-07-15.xsd $file + XSD_DIR=`dirname $0`/xsd + if [ ! -d "$XSD_DIR" ]; then + XSD_DIR=/usr/share/xml + fi + xmllint --noout --schema $XSD_DIR/pagecontent.2019-07-15.xsd $file done }