Changes between Version 42 and Version 43 of DASISH/XSD and XML


Ignore:
Timestamp:
04/29/13 11:42:07 (11 years ago)
Author:
olhsha
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • DASISH/XSD and XML

    v42 v43  
    3232=== Handling new (not yet in the DB) sources ===
    3333
    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.
     34Adding 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
     361) 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.
    3737
    3838See [source:DASISH/t5.6/docs/XMLandXSD/DASISH-schema.xsd DASISH-xsd].
    3939
    40 2) A "weakly-typed" schema. An annotation contain a list of elements-"targets", which are the same elements, which have two non-obligatory attributes, "ref" and "xml:id". The type-checking "''at least one of the attributes is present and they are mutually exclusive''" may be left later to schematron or so.
     402) A "weakly-typed" schema. An annotation contain a list of elements-"targets" of the same type that contains two non-obligatory attributes: "ref" and "xml:id". The type-checking "''at least one of the attributes is present and they are mutually exclusive''" may be left for later to schematron or so.
    4141
    4242See [source:DASISH/t5.6/docs/XMLandXSD/DASISH-schema-alternative.xsd DASISH-alternative-xsd].