<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<style>
<!--
@font-face
        {font-family:Calibri}
@font-face
        {font-family:Tahoma}
@font-face
        {font-family:Consolas}
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";
        color:black}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline}
pre
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";
        color:black}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {margin-top:0cm;
        margin-right:0cm;
        margin-bottom:0cm;
        margin-left:36.0pt;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";
        color:black}
span.HTMLVorformatiertZchn
        {font-family:Consolas;
        color:black}
span.E-MailFormatvorlage19
        {font-family:"Calibri","sans-serif";
        color:#1F497D}
span.SpellE
        {}
.MsoChpDefault
        {font-size:10.0pt}
@page WordSection1
        {margin:70.85pt 70.85pt 2.0cm 70.85pt}
div.WordSection1
        {}
ol
        {margin-bottom:0cm}
ul
        {margin-bottom:0cm}
-->
</style><style id="owaParaStyle" type="text/css">P {margin-top:0;margin-bottom:0;}</style>
</head>
<body ocsi="0" fpstyle="1" style="" lang="DE" link="blue" vlink="purple" bgcolor="white">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;; color:#1F497D">Hi Günter,</span></p>
<p class="MsoNormal"><br>
<span style="font-size:11.0pt; font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;; color:#1F497D"></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;; color:#1F497D">I finally got round to have a look on how to use MarcXML in Metamorph tests. It turned out that it is not possible in the current version. However, the problem
 is simple to fix and I just pushed a commit solving the problem (see [1]).</span></p>
<p class="MsoNormal"><br>
<span style="font-size:11.0pt; font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;; color:#1F497D"></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;; color:#1F497D">After applying the fix MarcXML can be written like this:</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;; color:#1F497D"><br>
</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;; color:#1F497D">&lt;test-case name=&quot;...&quot;&gt;</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;; color:#1F497D">&nbsp;&nbsp;&nbsp; &lt;input type=&quot;application/marcxml&#43;xml&quot;&gt;</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;; color:#1F497D">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;collection xmlns=&quot;http://www.loc.gov/MARC21/slim&quot;&gt;</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;; color:#1F497D">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;record&gt;</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;; color:#1F497D">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;leader&gt;...&lt;/leader&gt;</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;; color:#1F497D">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;controlfield tag=&quot;001&quot;&gt;123&lt;/controlfield&gt;</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;; color:#1F497D">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/record&gt;<br>
</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;; color:#1F497D">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/collection&gt;<br>
</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;; color:#1F497D">&nbsp;&nbsp;&nbsp; &lt;/input&gt;</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;; color:#1F497D">&nbsp;&nbsp;&nbsp; ...<br>
</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;; color:#1F497D">&lt;/test-case&gt;<br>
</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;; color:#1F497D"><br>
</span></p>
<p class="MsoNormal"><font face="Calibri">You can also specify MarcXML in the result element in the same way. It should also be possible to omit the collection element if you only have a single record, but I have not tried this.</font></p>
<p class="MsoNormal"><br>
</p>
<p class="MsoNormal"><font face="Calibri">Instead of specifying a default namespace on the collection&nbsp; element you can, of course, use any other method for declaring the namespace.</font></p>
<p class="MsoNormal"><br>
</p>
<p class="MsoNormal"><font face="Calibri">There is no need to wrap xml data in cdata-sections as the input and result elements allow arbitrary xml content. The reason this is not working without applying the fix is that the test framework distinguishes between
 xml and non-xml content. This is done based on the mimetype set via the type-attribute.</font><span style="font-size:11.0pt; font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;; color:#1F497D" lang="EN-GB"><font size="3"> XML-Parsing is only used for
<span class="SpellE">mimetypes</span> “application/xml”, “text/xml”, and any <span class="SpellE">
mimetype</span> ending with “&#43;xml”. As no mimetype was defined for MarcXML this was not working. The fix simply adds this mimetype.</font></span></p>
<p class="MsoNormal"><br>
<span style="font-size:11.0pt; font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;; color:#1F497D" lang="EN-GB"></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;; color:#1F497D" lang="EN-GB"><font size="3">Best,</font></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;; color:#1F497D" lang="EN-GB"><font size="3">Christoph</font></span><span style="font-size:11.0pt; font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;; color:#1F497D" lang="EN-GB"><span style=""></span></span><span style="font-size:11.0pt; font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;; color:#1F497D" lang="EN-GB"><span style=""><span style="font:7.0pt &quot;Times New Roman&quot;"><br>
</span></span></span><span style="font-size:11.0pt; font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;; color:#1F497D" lang="EN-GB"></span></p>
<p class="MsoListParagraph" style="text-indent: 0px; margin-left: 0px;"><span style="font-size:11.0pt; font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;; color:#1F497D" lang="EN-GB"><span style=""><span style="font:7.0pt &quot;Times New Roman&quot;"><br>
</span></span></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;; color:#1F497D"><br>
</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;; color:#1F497D">[1] https://github.com/culturegraph/metafacture-core/issues/229<br>
</span></p>
<span style="font-size:11.0pt; font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;; color:#1F497D" lang="EN-GB"></span><span style="font-size:11.0pt; font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;; color:#1F497D" lang="EN-GB"><span style=""></span></span><span style="font-size:11.0pt; font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;; color:#1F497D" lang="EN-GB"><span style=""><span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span><span style="font-size:11.0pt; font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;; color:#1F497D" lang="EN-GB"><br>
</span>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;; color:#1F497D" lang="EN-GB">&nbsp;</span></p>
<div style="border:none; border-left:solid blue 1.5pt; padding:0cm 0cm 0cm 4.0pt">
<div>
<div style="border:none; border-top:solid #B5C4DF 1.0pt; padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><a name="_MailOriginal"><b><span style="font-size:10.0pt; font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;; color:windowtext">Von:</span></b></a><span style=""><span style="font-size:10.0pt; font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;; color:windowtext"> metafacture-bounces@lists.dnb.de
 [mailto:metafacture-bounces@lists.dnb.de] <b>Im Auftrag von </b>Guenter Hipler<br>
<b>Gesendet:</b> Sonntag, 5. April 2015 16:24<br>
<b>An:</b> metafacture@lists.dnb.de<br>
<b>Cc:</b> Sebastian Schüpbach<br>
<b>Betreff:</b> [Metafacture] use of the MF test infrastructure</span></span></p>
</div>
</div>
<p class="MsoNormal"><span style="">&nbsp;</span></p>
<p class="MsoNormal"><span style=""><span style="">Hi, <br>
<br>
I tried to use the Metafacture test infrastructure. <br>
@Christoph: One reason not at least because I stumbled upon your last change on the wiki [1]<br>
<br>
Things are working fine using formeta as input conditions (with internal and external transformation morph transformation rules) [2] [3]<br>
<br>
Although personally I prefer to use a formeta format in comparison to Marc most of my colleagues are more familiar with Marc and I would like to use these testcases to provide a better documentation for our use cases (at the moment transformations).<br>
<br>
In metastream-readers.properties there is a<br>
marcxml org.culturegraph.mf.stream.reader.MarcXmlReader entry<br>
which I tried to use [4] but even for various alternatives in the input element of the testcase I get a parser exception. Looking into the code the formeta result reader will be instantiated and is getting the result condition which is correct formeta but the
 exception<br>
java.lang.AssertionError: org.culturegraph.mf.exceptions.FormatException: Parsing error at position 1: &gt;{&lt;neuerWert…, No record found:<br>
is thrown. Don't know if it is related to a missing input item?<br>
<br>
My question:<br>
Is it possible to use Marc definitions for the input element in test cases?<br>
<br>
@Christoph: thanks for your response on my last question related to xml-schema extensions for metamorph functions . I think at the moment I will go with my own Java type (not at least because I want a solution) Once I'm more familiar with the infrastructure
 I try to come back to it.<br>
<br>
Günter<br>
<br>
<br>
<br>
[1] </span></span><a href="https://github.com/culturegraph/metafacture-core/wiki/Testing-Framework-for-Metamorph" target="_blank"><span style=""><span style="">https://github.com/culturegraph/metafacture-core/wiki/Testing-Framework-for-Metamorph</span></span><span style=""></span></a><span style=""><span style=""><br>
[2] </span></span><a href="https://github.com/guenterh/mfSandbox/blob/master/src/test/java/org/guenterH/discover/step1/morph/MarcFormetaGH.xml" target="_blank"><span style=""><span style="">https://github.com/guenterh/mfSandbox/blob/master/src/test/java/org/guenterH/discover/step1/morph/MarcFormetaGH.xml</span></span><span style=""></span></a><span style=""><span style=""><br>
[3] </span></span><a href="https://github.com/guenterh/mfSandbox/blob/master/src/test/java/org/guenterH/discover/step1/morph/DataSource.java" target="_blank"><span style=""><span style="">https://github.com/guenterh/mfSandbox/blob/master/src/test/java/org/guenterH/discover/step1/morph/DataSource.java</span></span><span style=""></span></a><span style=""><span style=""><br>
[4] </span></span><a href="https://github.com/guenterh/mfSandbox/blob/master/src/test/java/org/guenterH/discover/step1/morph/MarcXMLNotOkGH.xml" target="_blank"><span style=""><span style="">https://github.com/guenterh/mfSandbox/blob/master/src/test/java/org/guenterH/discover/step1/morph/MarcXMLNotOkGH.xml</span></span><span style=""></span></a><span style=""><span style=""><br style="">
<br style="">
</span></span></p>
<pre><span style="">-- </span></pre>
<pre><span style="">Universität Basel</span></pre>
<pre><span style="">Universitätsbibliothek</span></pre>
<pre><span style="">Günter Hipler</span></pre>
<pre><span style="">Projekt SwissBib</span></pre>
<pre><span style="">Schoenbeinstrasse 18-20</span></pre>
<pre><span style="">4056 Basel, Schweiz</span></pre>
<pre><span style="">Tel.: &#43; 41 (0)61 267 31 12 Fax: &#43;&#43;41 61 267 3103</span></pre>
<pre><span style="">E-Mail </span><a href="mailto:guenter.hipler@unibas.ch" target="_blank"><span style="">guenter.hipler@unibas.ch</span><span style=""></span></a><span style=""></span></pre>
<pre><span style="">URL: </span><a href="http://www.swissbib.org" target="_blank"><span style="">www.swissbib.org</span><span style=""></span></a><span style=""><span style="">&nbsp; </span>/ </span><a href="http://www.ub.unibas.ch/" target="_blank"><span style="">http://www.ub.unibas.ch/</span><span style=""></span></a><span style=""> </span></pre>
</div>
</div>
</div>
</body>
</html>