kadaster / klic-win

https://kadaster.nl/zakelijk/registraties/landelijke-voorzieningen/klic
20 stars 16 forks source link

Unused namespaces declared in Mantelbuis, Duct, etc. #76

Closed adam-ludera-intive closed 3 years ago

adam-ludera-intive commented 4 years ago

In KLIC 19G674299 there are Mantelbuis elements that define multiple, unnecessary and unused namespaces:

<imkl:Mantelbuis xmlns:bu-core2d="http://inspire.ec.europa.eu/schemas/bu-core2d/4.0" xmlns:us-govserv="http://inspire.ec.europa.eu/schemas/us-govserv/4.0" xmlns:gsr="http://www.isotc211.org/2005/gsr" xmlns:gn="http://inspire.ec.europa.eu/schemas/gn/4.0" xmlns:ad="http://inspire.ec.europa.eu/schemas/ad/4.0" xmlns:gmlexr="http://www.opengis.net/gml/3.3/exr" xmlns:cp="http://inspire.ec.europa.eu/schemas/cp/4.0" xmlns:gts="http://www.isotc211.org/2005/gts" xmlns:sc="http://www.interactive-instruments.de/ShapeChange/AppInfo" xmlns:gss="http://www.isotc211.org/2005/gss" xmlns:gmd="http://www.isotc211.org/2005/gmd" xmlns:act-core="http://inspire.ec.europa.eu/schemas/act-core/4.0" xmlns:bu-base="http://inspire.ec.europa.eu/schemas/bu-base/4.0" xmlns:gco="http://www.isotc211.org/2005/gco" xmlns:au="http://inspire.ec.europa.eu/schemas/au/4.0" xmlns:tn="http://inspire.ec.europa.eu/schemas/tn/4.0" gml:id="nl.imkl-KL1088.Mantelbuis-1786">

Also similar happens with Duct elements: <imkl:Duct xmlns:gco="http://www.isotc211.org/2005/gco" xmlns:gmd="http://www.isotc211.org/2005/gmd" gml:id="nl.imkl-KL1011.DUCT_Duct_conduitsection_pni_conduit_4628225392129753613_10">

The set of allowed attributes and elements in the KLIC 2.2 is defined by the data model and thus importing additional, own, namespaces has no use in this case and must not be allowed.

This has been seen with other KLICs too

herman-vandenberg commented 4 years ago

We will analyze this KLIC-request. Although this behavior is undesirable and does not correspond to the documented guidelines, it is not syntactically incorrect. We will inform the relevant network operator.

herman-vandenberg commented 4 years ago

We analyzed the problem again and discussed this with the network operator/serviceprovider. In Dutch:

De beheerdersinformatie die door netbeheerder KL1011 (Ziggo B.V.) voor aanvraag 20G110408 is aangeleverd, begint als volgt:

<?xml version="1.0" encoding="utf-8"?>
<!--File created by    : KlicWin (serviceprovider)-->
<!--File creation date : 2020-02-20 at 13:08:28-->
<!--Target output      : Imkl.Nl (KlicWinGml)-->
<!--Application host   : Server-->
<gml:FeatureCollection 
xmlns:imkl="http://www.geostandaarden.nl/imkl/2015/wion/1.2" 
xmlns:us-net-wa="http://inspire.ec.europa.eu/schemas/us-net-wa/4.0" 
xmlns:us-net-sw="http://inspire.ec.europa.eu/schemas/us-net-sw/4.0" 
xmlns:us-net-common="http://inspire.ec.europa.eu/schemas/us-net-common/4.0" 
xmlns:us-net-el="http://inspire.ec.europa.eu/schemas/us-net-el/4.0" 
xmlns:us-net-ogc="http://inspire.ec.europa.eu/schemas/us-net-ogc/4.0" 
xmlns:net="http://inspire.ec.europa.eu/schemas/net/4.0" 
xmlns:base="http://inspire.ec.europa.eu/schemas/base/3.3" 
xmlns:base2="http://inspire.ec.europa.eu/schemas/base2/1.0" 
xmlns:gml="http://www.opengis.net/gml/3.2" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xsi:schemaLocation="http://www.geostandaarden.nl/imkl/2015/wion/1.2 http://www.geostandaarden.nl/imkl/2015/wion/1.2.1/imkl2015-wion.xsd" 
xmlns:xlink="http://www.w3.org/1999/xlink" 
xmlns:gco="http://www.isotc211.org/2005/gco" 
xmlns:gmd="http://www.isotc211.org/2005/gmd" 
gml:id="ID_2020_02_20_13_08_28">

Daarbij worden een aantal namespaces gedeclareerd die NIET in de standaardlijst van IMKL voorkomen, te weten:

xmlns:gco="http://www.isotc211.org/2005/gco" 
xmlns:gmd="http://www.isotc211.org/2005/gmd"

De afspraken over de standaardlijst voor namespace-declaraties zijn gepubliceerd op GitHub: Standaard namespace afkortingen.

Bij de verwerking van de door netbeheerders aangeleverde XML proberen we niet van alle IMKL-objecten te detecteren of er mogelijk namespace-afkortingen worden gebruikt die niet in de standaardlijst voorkomen. Om semantisch correcte XML uit te leveren, voegen we daarentegen alle namespace-declaraties die niet in de standaardlijst voorkomen toe aan de IMKL-objecten van de betreffende netbeheerder. Dit levert dus voor alle IMKL-objecten die door de betreffende netbeheerder (KL1011) zijn aangeleverd, de volgende feature-structuur op:

<gml:featureMember>
<imkl:Duct xmlns:gco="http://www.isotc211.org/2005/gco" xmlns:gmd="http://www.isotc211.org/2005/gmd" gml:id="nl.imkl-KL1011.DUCT_Duct_conduitsection_pni_conduit_1943463162327386815_4">
            <net:beginLifespanVersion>2020-02-20T00:00:00+01:00</net:beginLifespanVersion>
            ...

Dit gebeurt dus ongeacht het feit of de namespace-afkorting door het betreffende IMKL-object wordt gebruikt!

In de betreffende documentatie op GitHub wordt wel een suggestie gedaan hoe een netbeheerder een namespace zou kunnen gebruiken die niet in de standaardlijst wordt genoemd. Zie daarvoor Definiëring namespaces op dieper niveau. Voorbeeld toepassing:

<gml:featureMember>
    <imkl:Utiliteitsnet gml:id="nl.imkl-KL1011.UNET_telecommunications_222">
        ...
        <us-net-common:disclaimer >
            <gmd:PT_FreeText xmlns:gmd="http://www.isotc211.org/2005/gmd">
                <gmd:textGroup>
                    <gmd:LocalisedCharacterString>https://www.telecom.eu/docs/brochure-graaf-zorgvuldig.pdf</gmd:LocalisedCharacterString>
                </gmd:textGroup>
            </gmd:PT_FreeText>
        </us-net-common:disclaimer>
        ...
    </imkl:Utiliteitsnet>
</gml:featureMember>