From dd8bb061120181e0e05f3408a0b58741ac2608ad Mon Sep 17 00:00:00 2001
From: David Maus <maus@hab.de>
Date: Fri, 16 Feb 2018 10:41:10 +0100
Subject: [PATCH] Eingabedokument validieren

---
 src/xproc/publish.xpl | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/src/xproc/publish.xpl b/src/xproc/publish.xpl
index 6b88fa3..23fe848 100644
--- a/src/xproc/publish.xpl
+++ b/src/xproc/publish.xpl
@@ -8,10 +8,22 @@
 
   <p:serialization port="result" indent="true"/>
 
+  <p:validate-with-schematron name="validate-kitodo">
+    <p:input port="source">
+      <p:pipe step="main" port="source"/>
+    </p:input>
+    <p:input port="schema">
+      <p:document href="../schema/kitodo.sch"/>
+    </p:input>
+    <p:input port="parameters">
+      <p:empty/>
+    </p:input>
+  </p:validate-with-schematron>
+
   <p:xslt name="normalize">
     <p:with-param name="objectId" select="$objectId"/>
     <p:input port="source">
-      <p:pipe step="main" port="source"/>
+      <p:pipe step="validate-kitodo" port="result"/>
     </p:input>
     <p:input port="stylesheet">
       <p:document href="../xslt/mets.xsl"/>
-- 
GitLab