Skip to content
Snippets Groups Projects
Commit ab279e59 authored by David Maus's avatar David Maus
Browse files

Verwende RelaxNG in Pipeline

parent 9dfafe5b
No related branches found
No related tags found
No related merge requests found
......@@ -35,73 +35,60 @@
<d:uuid-source name="uuid-source"/>
<p:choose>
<p:when test="doc-available(resolve-uri($targetUri))">
<p:error code="TargetFileExists">
<p:input port="source">
<p:empty/>
</p:input>
</p:error>
<p:sink/>
</p:when>
<p:otherwise>
<p:documentation>Schritt 1: Validieren der von Kitodo.Production erzeugten METS-Datei</p:documentation>
<p:validate-with-relax-ng name="validate-kitodo">
<p:input port="source">
<p:pipe step="main" port="source"/>
</p:input>
<p:input port="schema">
<p:data href="../schema/kitodo.rnc"/>
</p:input>
</p:validate-with-relax-ng>
<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:with-param name="eventCreateUUID" select="/uuid/@create">
<p:pipe step="uuid-source" port="result"/>
</p:with-param>
<p:with-param name="eventNormalizeUUID" select="/uuid/@normalize">
<p:pipe step="uuid-source" port="result"/>
</p:with-param>
<p:with-param name="eventNormalizeAgent" select="concat(p:system-property('p:product-name'), ' ', p:system-property('p:product-version'))"/>
<p:input port="source">
<p:pipe step="validate-kitodo" port="result"/>
</p:input>
<p:input port="stylesheet">
<p:document href="../xslt/mets.xsl"/>
</p:input>
</p:xslt>
<p:documentation>Schritt 2: METS-Datei normalisieren</p:documentation>
<p:xslt name="normalize">
<p:with-param name="objectId" select="$objectId"/>
<p:with-param name="eventCreateUUID" select="/uuid/@create">
<p:pipe step="uuid-source" port="result"/>
</p:with-param>
<p:with-param name="eventNormalizeUUID" select="/uuid/@normalize">
<p:pipe step="uuid-source" port="result"/>
</p:with-param>
<p:with-param name="eventNormalizeAgent" select="concat(p:system-property('p:product-name'), ' ', p:system-property('p:product-version'))"/>
<p:input port="source">
<p:pipe step="validate-kitodo" port="result"/>
</p:input>
<p:input port="stylesheet">
<p:document href="../xslt/mets.xsl"/>
</p:input>
</p:xslt>
<p:validate-with-xml-schema assert-valid="true" name="validate-mets">
<p:input port="source">
<p:pipe step="normalize" port="result"/>
</p:input>
<p:input port="schema">
<p:document href="../schema/mets.xsd"/>
</p:input>
</p:validate-with-xml-schema>
<p:documentation>Schritt 3: Normalisierte METS-Datei validieren</p:documentation>
<p:validate-with-xml-schema assert-valid="true" name="validate-mets">
<p:input port="source">
<p:pipe step="normalize" port="result"/>
</p:input>
<p:input port="schema">
<p:document href="../schema/mets.xsd"/>
</p:input>
</p:validate-with-xml-schema>
<p:validate-with-schematron assert-valid="true">
<p:input port="source">
<p:pipe step="validate-mets" port="result"/>
</p:input>
<p:input port="schema">
<p:document href="../schema/diglib.sch"/>
</p:input>
<p:input port="parameters">
<p:empty/>
</p:input>
</p:validate-with-schematron>
<p:validate-with-schematron assert-valid="true">
<p:input port="source">
<p:pipe step="validate-mets" port="result"/>
</p:input>
<p:input port="schema">
<p:document href="../schema/diglib.sch"/>
</p:input>
<p:input port="parameters">
<p:empty/>
</p:input>
</p:validate-with-schematron>
<p:store>
<p:with-option name="href" select="$targetUri"/>
</p:store>
</p:otherwise>
</p:choose>
<p:documentation>Schritt 4: Normalisierte METS-Datei schreiben</p:documentation>
<p:store>
<p:with-option name="href" select="$targetUri"/>
</p:store>
</p:declare-step>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment