Closed marqh closed 6 years ago
related to #16
The xsi:nil is required in cases where the XML Schema defines contents, such as the prevailingVisibility case above using MeasureType. The reference types do not require contents and therefore do not require any "nilling". The most we can do is look for cases where we unnecessarily create elements with content intended to be nillable or in cases where GML provides an alternative that does not require it to be nilled.
If we ever decide to go with an alternative representation for measured types we can revisit this, but for the time being this is the recommended option for nillable GML MeasureTypes.
An example of a nilled MeasureType should be added to the TAC to XML Guidance document, after which this issue can be closed.
It was noticed that UML Classes with stereotypes
<<dataType>>
transform into XML schemas with no empty content and @nilReason support (see Section E2.4.5 of ISO 19136:2007 for details). For the rest of the stereotypes since the corresponding XML schema serialization are extending GML types which include directly or indirectly attributeGroup "AssociationAttributeGroup" (support for using xlink), the resulting XML entities will automatically allow empty content and the use of @nilReason. To include support for empty content and @nilReason to<<dataType>>
UML Class and others which have similar super classes like GML primitives, GML introduces relevant UML-to-XML schema serialization rule with the use of tagged value nillable="true" in UML attributes and UML association ends (see Section 8.2.3.2 of ISO 19136:2007). The latter arrangement, however, requires the use of xsi:nil="true" in an instance to signify that the entity is empty. The following indicates differences of the approaches:As the above may introduce confusion to implementors, it is necessary to consider whether a technical or documentary solution will be used to overcome this issue.
ref: https://software.ecmwf.int/issues/browse/AVXML-54