approved join on single word crashes the text
If there is an approved join that "joins" a single word with itself, the text in which it occurs cannot be displayed and throws the following error:
500Merging error. err:XPTY0004: It is a type error if, during the static analysis phase, an expression is found to have a static type that is not appropriate for the context in which the expression occurs, or during the dynamic evaluation phase, the dynamic type of a value does not match a required type as specified by the matching rules in 2.5.4 SequenceType Matching. checking function parameter 1 in call map:entry(untyped-value-check[xs:anyAtomicType, $lca], $annotation): XPTY0004: The actual cardinality for parameter 1 does not match the cardinality declared in the function's signature: map:entry($key as xs:anyAtomicType, $value as item()*) map. Expected cardinality: exactly one, got 0.
An example of an annotation that causes this:
<annotation-item generator="earlyPrint" id="Ad885068d-3df1-4bf9-ad9f-7c14b220aec7" status="accepted" visibility="public" reason="" creator="elisabeth.chaghafi@uni-tuebingen.de" created="2017-10-10T16:19:57.244Z" modified="2017-10-10T16:19:57.244Z" generated="2017-10-10T16:19:57.244Z" ticket="s-1507652397243">
<annotation-body subtype="join" format="text/xml" type="TEI" original-value="shore">
<w>shore</w>
</annotation-body>
<annotation-target source="A12024" version="">
<target-selector type="RangeSelector">
<start-selector type="IdSelector" value="tmp-1507652332693"/>
<end-selector type="IdSelector" value="A12024-021-b-0440"/>
</target-selector>
</annotation-target>
</annotation-item>
Note that the start-selector is pointing to a temporary ID rather than the xml:id of a real word; that may well be the root of the issue.
The annotation client should not allow such an annotation to be created, and the annotation service should not fall down so hard when it encounters one.
Comments (3)
-
reporter -
reporter We are no longer using the merge feature of the annotation service, so we will not see merge errors. While the client could still do more validation, that was not the critical problem noted here.
-
reporter - changed status to resolved
We are no longer using the merge feature of the annotation service, so we will not see merge errors. While the client could still do more validation, that was not the critical problem noted here.
- Log in to comment
This should be substantially mitigated by the following change to the annotation service, but the client should still do its own validation: