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

Schreibe Ergebnis in Dateisystem

parent 72bd350a
No related branches found
No related tags found
No related merge requests found
......@@ -2,41 +2,58 @@
xmlns:p="http://www.w3.org/ns/xproc">
<p:input port="source" primary="true" sequence="false"/>
<p:output port="result" primary="true" sequence="false"/>
<p:option name="objectId" required="true"/>
<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="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">
<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:option name="objectId" required="true"/>
<p:option name="targetUri" required="true"/>
<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: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="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">
<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:store>
<p:with-option name="href" select="$targetUri"/>
</p:store>
</p:otherwise>
</p:choose>
</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