Changes between Version 38 and Version 39 of DASISH/XSD and XML


Ignore:
Timestamp:
04/29/13 11:26:43 (11 years ago)
Author:
olhsha
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • DASISH/XSD and XML

    v38 v39  
    1414= XSD Schema =
    1515
     16== Preamble ==
     17
    1618The xsd schema is designed according to the following paradigm:
    1719
     
    2830There is a number of auxiliary types as well. A commonly-used one is ResourceREF which contains the attribute "ref" of type {{{xs:anyURI}}}. It allows to have announce elements-references and avoid mixing-them-up with elements-resources, without adding REF to the name. For instance {{{<owner ref="http:/dasish.eu/users/UIDefef"  />}}}.
    2931
    30 Adding annotation with the target sources which are not yet in DB needs special treatment. Two options seem reasonable.
    31 
    32 1) See [source:DASISH/t5.6/docs/XMLandXSD/DASISH-schema.xsd DASISH-xsd].
     32=== Handling new (not yet in the DB sources) ===
     33
     34Adding 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
     361) 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.
     37
     38See [source:DASISH/t5.6/docs/XMLandXSD/DASISH-schema.xsd DASISH-xsd].
     39
     402) 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.
     41
     42See [source:DASISH/t5.6/docs/XMLandXSD/DASISH-schema-alternative.xsd DASISH-alternative-xsd].
     43
     44Olha: personally I'm pro first "strongly-typed" version, because the second schema allows to validate sence-less xmls.
    3345
    3446