34 | | Adding annotation with the target sources which are not yet in DB needs special treatment. It becomes clear when the POST body for a new annotation must be serialized. Two approaches seem to be plausible. |
35 | | |
36 | | 1) A "strongly-typed" schema. An annotation contain a list of elements-"targets". Each of them can be either source element or a new-source element. It is implemented using xs:choice construct for elements. A source and new-source element differs by one attribute: a source has obligatory "ref" attribute, and a new source has an obligatory "xml:id" attribute. |
| 34 | Adding annotation with the target sources which are not yet in the DB needs special treatment. It becomes clear when the POST body for a new annotation must be serialized. Two approaches seem to be plausible. |
| 35 | |
| 36 | 1) A "strongly-typed" schema. An annotation contains a list of elements-"targets". Each of them can be either a source element or a new-source element. It is implemented using xs:choice construct for elements. A source and a new-source element differs by one attribute: a source has obligatory "ref" attribute, and a new source has an obligatory "xml:id" attribute. |