Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@

<xsl:choose>
<xsl:when test="$dcatElementConfig">
<xsl:for-each-group select="$allIndividualOrOrganisationWithoutIndividual" group-by="cit:name">
<xsl:for-each-group select="$allIndividualOrOrganisationWithoutIndividual" group-by="(cit:name,'individualDoesNotCarryACitName')[1]">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cmangeat can you explain this change?

Copy link
Contributor Author

@cmangeat cmangeat Sep 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as individuals do not carry a cit:name they will never be taken into account when for-each-group.

indeed, when grouping by something empty (such as cit:name for an individual), it is not looping, cf. group-by-expression.

the workaround explained here can be used.

(this said, if the purpose of the group by is to avoid an organisation to be returned redundantly, it seems that it does not work (iso19115-3-to-dcat-agent is called many times), as there is no need to change 'individualDoesNotCarryACitName' by generate-id() when many contacts (individual not from an org): with 'individualDoesNotCarryACitName' static, every contact are returned. If of use (not sure), could be better to simply change for-each-group by for-each and remove group-by ?).

<xsl:element name="{$dcatElementConfig/@key}">
<xsl:choose>
<xsl:when test="$dcatElementConfig/@as = 'vcard'">
Expand All @@ -73,7 +73,7 @@
Range: prov:Attribution
Usage note: Used to link to an Agent where the nature of the relationship is known but does not match one of the standard [DCTERMS] properties (dcterms:creator, dcterms:publisher). Use dcat:hadRole on the prov:Attribution to capture the responsibility of the Agent with respect to the Resource. See 15.1 Relationships between datasets and agents for usage examples.
-->
<xsl:for-each-group select="$allIndividualOrOrganisationWithoutIndividual" group-by="cit:name">
<xsl:for-each-group select="$allIndividualOrOrganisationWithoutIndividual" group-by="(cit:name, 'individualDoesNotCarryACitName')[1]">
<prov:qualifiedAttribution>
<prov:Attribution>
<prov:agent>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,15 @@
</foaf:page>
</xsl:template>

<xsl:template mode="iso19115-3-to-dcat"
match="mdb:distributionInfo/mrd:MD_Distribution/mrd:distributionFormat">
<dcat:distribution>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unless I'm really wrong, this element will be invalid. See https://semiceu.github.io/DCAT-AP/releases/3.0.0/#Distribution, access URL is required.

I think what @fxprunayre meant is to modify the existing template to process the online resources, to use the transferOptions format if exists, otherwise use the distribution ones as you did in the original code.

I would rather add an additional rule https://github.com/geonetwork/core-geonetwork/blob/main/schemas/iso19115-3.2018/src/main/plugin/iso19115-3.2018/formatter/dcat/dcat-core-distribution.xsl#L336-L339 and gives priority to transferOptions format if any and then fallback on distribution ones.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot ! We did not know about it. Back to draft / analysis, ;-) !

<dcat:Distribution>
<xsl:apply-templates mode="iso19115-3-to-dcat-distribution" select="*/mrd:formatSpecificationCitation"/>
</dcat:Distribution>
</dcat:distribution>
</xsl:template>

<!--
RDF Property: dcat:distribution
Definition: An available distribution of the dataset.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@
|mdb:identificationInfo/*/mri:extent/*/gex:geographicElement/gex:EX_GeographicBoundingBox
|mdb:identificationInfo/*/mri:extent/*/gex:geographicElement/gex:EX_GeographicDescription
|mdb:identificationInfo/*/mri:extent/*/gex:temporalElement/*/gex:extent
|mdb:distributionInfo/mrd:MD_Distribution/mrd:distributionFormat
|mdb:distributionInfo//mrd:onLine
|.//mpc:portrayalCatalogueCitation/*/cit:onlineResource
|.//mrl:additionalDocumentation//cit:onlineResource
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,26 @@
<dct:description xml:lang="fr">pds_codt_pic</dct:description>
</foaf:Document>
</foaf:page>
<dcat:distribution>
<dcat:Distribution>
<dct:format>
<dct:MediaTypeOrExtent>
<rdfs:label>ESRI Shapefile
(.shp)</rdfs:label>
</dct:MediaTypeOrExtent>
</dct:format>
</dcat:Distribution>
</dcat:distribution>
<dcat:distribution>
<dcat:Distribution>
<dct:format>
<dct:MediaTypeOrExtent>
<rdfs:label>ESRI File
Geodatabase (.fgdb)</rdfs:label>
</dct:MediaTypeOrExtent>
</dct:format>
</dcat:Distribution>
</dcat:distribution>
<dcat:distribution>
<dcat:Distribution>
<dct:issued rdf:datatype="http://www.w3.org/2001/XMLSchema#date">2023-02-21</dct:issued>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -468,6 +468,26 @@
<dct:description xml:lang="fr">pds_codt_pic</dct:description>
</foaf:Document>
</foaf:page>
<dcat:distribution>
<dcat:Distribution>
<dct:format>
<dct:MediaTypeOrExtent>
<rdfs:label>ESRI Shapefile
(.shp)</rdfs:label>
</dct:MediaTypeOrExtent>
</dct:format>
</dcat:Distribution>
</dcat:distribution>
<dcat:distribution>
<dcat:Distribution>
<dct:format>
<dct:MediaTypeOrExtent>
<rdfs:label>ESRI File
Geodatabase (.fgdb)</rdfs:label>
</dct:MediaTypeOrExtent>
</dct:format>
</dcat:Distribution>
</dcat:distribution>
<dcat:distribution>
<dcat:Distribution>
<dct:issued rdf:datatype="http://www.w3.org/2001/XMLSchema#date">2023-02-21</dct:issued>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -459,6 +459,26 @@
<dct:description xml:lang="fr">pds_codt_pic</dct:description>
</foaf:Document>
</foaf:page>
<dcat:distribution>
<dcat:Distribution>
<dct:format>
<dct:MediaTypeOrExtent>
<rdfs:label>ESRI Shapefile
(.shp)</rdfs:label>
</dct:MediaTypeOrExtent>
</dct:format>
</dcat:Distribution>
</dcat:distribution>
<dcat:distribution>
<dcat:Distribution>
<dct:format>
<dct:MediaTypeOrExtent>
<rdfs:label>ESRI File
Geodatabase (.fgdb)</rdfs:label>
</dct:MediaTypeOrExtent>
</dct:format>
</dcat:Distribution>
</dcat:distribution>
<dcat:distribution>
<dcat:Distribution>
<dct:issued rdf:datatype="http://www.w3.org/2001/XMLSchema#date">2023-02-21</dct:issued>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -468,6 +468,26 @@
<dct:description xml:lang="fr">pds_codt_pic</dct:description>
</foaf:Document>
</foaf:page>
<dcat:distribution>
<dcat:Distribution>
<dct:format>
<dct:MediaTypeOrExtent>
<rdfs:label>ESRI Shapefile
(.shp)</rdfs:label>
</dct:MediaTypeOrExtent>
</dct:format>
</dcat:Distribution>
</dcat:distribution>
<dcat:distribution>
<dcat:Distribution>
<dct:format>
<dct:MediaTypeOrExtent>
<rdfs:label>ESRI File
Geodatabase (.fgdb)</rdfs:label>
</dct:MediaTypeOrExtent>
</dct:format>
</dcat:Distribution>
</dcat:distribution>
<dcat:distribution>
<dcat:Distribution>
<dct:issued rdf:datatype="http://www.w3.org/2001/XMLSchema#date">2023-02-21</dct:issued>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -463,6 +463,26 @@
<dct:description xml:lang="fr">pds_codt_pic</dct:description>
</foaf:Document>
</foaf:page>
<dcat:distribution>
<dcat:Distribution>
<dct:format>
<dct:MediaTypeOrExtent>
<rdfs:label>ESRI Shapefile
(.shp)</rdfs:label>
</dct:MediaTypeOrExtent>
</dct:format>
</dcat:Distribution>
</dcat:distribution>
<dcat:distribution>
<dcat:Distribution>
<dct:format>
<dct:MediaTypeOrExtent>
<rdfs:label>ESRI File
Geodatabase (.fgdb)</rdfs:label>
</dct:MediaTypeOrExtent>
</dct:format>
</dcat:Distribution>
</dcat:distribution>
<dcat:distribution>
<dcat:Distribution>
<dct:issued rdf:datatype="http://www.w3.org/2001/XMLSchema#date">2023-02-21</dct:issued>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -481,6 +481,26 @@
<dct:description xml:lang="fr">pds_codt_pic</dct:description>
</foaf:Document>
</foaf:page>
<dcat:distribution>
<dcat:Distribution>
<dct:format>
<dct:MediaTypeOrExtent>
<rdfs:label>ESRI Shapefile
(.shp)</rdfs:label>
</dct:MediaTypeOrExtent>
</dct:format>
</dcat:Distribution>
</dcat:distribution>
<dcat:distribution>
<dcat:Distribution>
<dct:format>
<dct:MediaTypeOrExtent>
<rdfs:label>ESRI File
Geodatabase (.fgdb)</rdfs:label>
</dct:MediaTypeOrExtent>
</dct:format>
</dcat:Distribution>
</dcat:distribution>
<dcat:distribution>
<dcat:Distribution>
<dct:issued rdf:datatype="http://www.w3.org/2001/XMLSchema#date">2023-02-21</dct:issued>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,15 @@
<foaf:page>
<foaf:Document rdf:about="https://services.geodata-utrecht.nl/geoserver/v01_1_mobiliteit/wms?request=GetMap&amp;service=WMS&amp;SRS=EPSG:28992&amp;CRS=EPSG:28992&amp;bbox=112656.06,436541.64,173834.94,482076.36&amp;width=600&amp;height=446&amp;format=image/png&amp;styles=&amp;layers=Regionaal_Fietsnetwerk"/>
</foaf:page>
<dcat:distribution>
<dcat:Distribution>
<dct:format>
<dct:MediaTypeOrExtent>
<rdfs:label>File Geodatabase Feature Class</rdfs:label>
</dct:MediaTypeOrExtent>
</dct:format>
</dcat:Distribution>
</dcat:distribution>
<dcat:distribution>
<dcat:Distribution>
<dct:modified rdf:datatype="http://www.w3.org/2001/XMLSchema#date">2024-11-26</dct:modified>
Expand Down
Loading