INSPIRE-MIF / 2017.2

Repository for action 2017.2 on alternative encodings
6 stars 11 forks source link

Update description PropertyCompositionToAssociation #78

Closed heidivanparys closed 5 years ago

heidivanparys commented 5 years ago

I think the title is wrong, it is not change from composition of association, it is a change of how the association should be encoded.

Proposal for new title: Restriction of property encoding options to only by-reference

I also added some examples, so all three possibilities for encoding a property to another object are present (by-reference, inline, combination of both).

heidivanparys commented 5 years ago

From the description (and the original issue #56) (marking in bold is mine):

Information regarding resources such as legal documents can be stored in an external register or non-INSPIRE online application, possibly using other standardised encodings. Such information should not be duplicated in the INSPIRE model if possible. Thus, the information should be referred to from a GML application schema "by reference".

It gives a lot of work for data providers when they have to document a lot of metadata regarding e.g. laws, documents, authorities, etc. that they are not responsible for, and when this information is already online somewhere else this is redundant work. Therefore, properties referring to laws, documents, authorities and other online resources not typically belonging to the geographic information domain should be implemented by reference, and it should be recognised that their values are not necessarily encoded in GML.

Let's discuss at the next online meeting.

heidivanparys commented 5 years ago

@thorsten-reitz @cportele @PeterParslow First results of the research I promised to do:

Even though XLink links must appear in XML documents, they are able to associate all kinds of resources, not just XML-encoded ones (XLink spec).

This is actually used as well in the GML standard in some examples:

image

image

image

However, when it comes to association roles of GML objects, the GML standard is not entirely clear.

The appearance of an xlink:href on a GML property indicates that the value of the property shall be found by traversing the link, that is the value is pointed to by the value of the xlink:href attribute. Following the terminology of Xlink, GML properties with xlink:href attributes are sometimes referred to as remote properties.

[...]

A URI reference [URI] is defined as an optional choice between an absolute or relative URI, followed by fragment identifier that consists of a crosshatch ("#") and additional reference information. For GML object properties and remote associations, this additional reference information shall be one of the following:

  • a shorthand (formerly called "barename") XPointer [XPointer Framework] consisting of the value of the gml:id attribute of a GML object, or
  • an element() scheme based XPointer [XPointer element()], or
  • an xpointer() scheme based XPointer [XPointer xpointer()] containing an XPath [XPath] expression that selects a GML object, optionally preceded by one or more xmlns() scheme based XPointer(s) [XPointer xmlns()] that define the namespace prefixes used in the XPath expression.

A URI that does not contain an absolute or relative URI, but that consists entirely of a fragment identifier, refers to a GML object elsewhere in the same GML document.

Absolute and relative URIs may include a query component that consists of a question mark ("?") followed by a query to be interpreted by the resource. For GML object properties and remote associations, any such query shall be a request to a service that returns a GML object. The URI containing such a query may or may not make use of a fragment identifier, depending on the request syntax defined by the service.

So, shall the value in xlink:href return an object encoded in GML? Or may it be another encoding? (XML, RDF, something else)?

According to the standard, if a query component is present, a GML object shall be returned. But if no query component is present, what then?

cportele commented 5 years ago

When xlinks are used in GML for a feature to feature association role, it will be a typical assumption that the link target is a GML feature, but agents always have to be prepared that the response to GET on an xlink:href is something else.

Of course links may also be used to reference all kinds of resources and not just for association roles where the value type is a feature (as it is shown in the examples).

heidivanparys commented 5 years ago

@thorsten-reitz @michellutz I updated the description of one model transformation and added a new one. The descriptions are not yet finished. If you agree on the overall idea, please accept the pull request, details can be added later then.