Two conflicting approved annotations prevent page load

Issue #47 resolved
Craig Berry created an issue

Two approved split annotations on the same word like so:

<annotation-item generator="earlyPrint" id="Af542d6c9-b1f8-412c-b6d0-f192975ed67d" status="accepted" visibility="public" reason="" creator="elisabeth.chaghafi@uni-tuebingen.de" created="2017-10-10T13:25:08.974Z" modified="2017-10-10T13:25:08.974Z" generated="2017-10-10T13:25:08.974Z" ticket="s-1507641908972">
    <annotation-body subtype="split" format="text/xml" type="TEI" original-value="pomp●…">
        <w>pompe</w>
        <c> </c>
        <w>,</w>
    </annotation-body>
    <annotation-target source="A20092" version="">
        <target-selector type="IdSelector" value="A20092-004-b-0570"/>
    </annotation-target>
</annotation-item>

 <annotation-item generator="earlyPrint" id="A21962751-e6f2-483d-bac6-3a0cbb57e716" status="accepted" visibility="public" reason="" creator="elisabeth.chaghafi@uni-tuebingen.de" created="2017-10-10T13:24:39.100Z" modified="2017-10-10T13:24:39.100Z" generated="2017-10-10T13:24:39.100Z" ticket="s-1507641879096">
    <annotation-body subtype="split" format="text/xml" type="TEI" original-value="pomp●…">
        <w>pompe,</w>
        <c> </c>
        <w>in</w>
    </annotation-body>
    <annotation-target source="A20092" version="">
        <target-selector type="IdSelector" value="A20092-004-b-0570"/>
    </annotation-target>
</annotation-item>

will prevent the page they are on from being loaded. The error thrown is:

500Merging error. java:org.exist.xquery.XPathException: exerr:ERROR XPTY0004: The actual cardinality for parameter 1 does not match the cardinality declared in the function's signature: local-name($arg as node()?) xs:string. Expected cardinality: zero or one, got 3. [at line 388, column 38, source: /db/apps/annotation-service/modules/standoff2inline.xqm] In function: s2i:split(item()*, item()*, item()*) [126:29:/db/apps/annotation-service/modules/standoff2inline.xqm] s2i:wrap(item()*, item()*) [345:5:/db/apps/annotation-service/modules/standoff2inline.xqm] s2i:expand-annotations(node()*, function) [352:9:/db/apps/annotation-service/modules/standoff2inline.xqm] s2i:process-children(element(), function) [336:17:/db/apps/annotation-service/modules/standoff2inline.xqm] s2i:expand-annotations(node()*, function) [352:9:/db/apps/annotation-service/modules/standoff2inline.xqm] s2i:process-children(element(), function) [336:17:/db/apps/annotation-service/modules/standoff2inline.xqm] s2i:expand-annotations(node()*, function) [352:9:/db/apps/annotation-service/modules/standoff2inline.xqm] s2i:process-children(element(), function) [336:17:/db/apps/annotation-service/modules/standoff2inline.xqm] s2i:expand-annotations(node()*, function) [76:9:/db/apps/annotation-service/modules/standoff2inline.xqm] s2i:merge-milestone-chunk(document-node(), element(), element()?, node()*) [397:17:/db/apps/annotation-service/modules/standoff2inline.xqm]. XPTY0004: The actual cardinality for parameter 1 does not match the cardinality declared in the function's signature: local-name($arg as node()?) xs:string. Expected cardinality: zero or one, got 3.

The merge operation should be robust enough to handle this, possibly choosing the later of the two annotations. There is also the problem of whether an approved annotation can be revised, deleted, or unapproved. The problem with that is that approval indicates the annotation is ready for downstream processing, but the user won't know the status of that processing.

Comments (1)

  1. Craig Berry reporter

    We are no longer using the merge feature of the annotation service, so we no longer need to worry about merge errors.

  2. Log in to comment