Documenting deprecation in the schema

Added by Michael Lutz over 6 years ago

Is it useful to include “deprecation metadata” in the schema or is a simple string “DEPRECATED” sufficient?

EXAMPLE <deprecation> element with metadata

<annotation>
  (…)
  <appinfo>
    <deprecated xmlns="http://inspire.ec.europa.eu/..." sinceVersion="3.1" sinceDate="2013-10-21" sup-portedUntil="2016-12-31">true</deprecated>
    <targetElement xmlns="http://www.opengis.net/gml/3.2">stat:NUTSRegion</targetElement>
  </appinfo>
</annotation>

EXAMPLE Deprecation using a simple string in an <appinfo> element.

<annotation>
  (…)
  <appinfo>DEPRECATED</appinfo>
  <appinfo>
    <targetElement xmlns="http://www.opengis.net/gml/3.2">stat:NUTSRegion</targetElement>
  </appinfo>
</annotation>

Replies (2)

RE: Documenting deprecation in the schema - Added by Pawel Soczewski about 6 years ago

From a technical point of view (dataset validation), it depends on which deep level of backward compatibility is to be maintained - only one version or deeper. If only first, simple string is sufficient. In the second case, additional information may be useful.

RE: Documenting deprecation in the schema - Added by Alberto Belussi about 6 years ago

I think it is very useful. Otherwise the user cannot understand which set of type definitions and element declarations are part of the current schema and which are not. The more metainformation you can add the better is. If you introduce the attributes for representing the period during which the deprecated constructs are still accepted, you need to produce the successive schema consistently (i.e. after the “supportedUntil” date a deprecated construct should be dropped from the xsd file).
Also in the UML schemas deprecated constructs (e.i., class, datatype, enumeration, codelist, attributes and roles) should be marked through a stereotype. This would require additional testing activities in order to define rules for dealing with the deprecated parts of the UML schema in WFS configuration and eventually in database creation.

(1-2/2)