Skip to content

Commit

Permalink
Spatial representation type mandatory and validation rules (#404)
Browse files Browse the repository at this point in the history
* Spatial representation type mandatory and validation rules

* update error message
  • Loading branch information
wangf1122 authored Oct 29, 2024
1 parent 88e4d21 commit a47c0aa
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/main/plugin/iso19139.ca.HNAP/loc/eng/labels.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1936,6 +1936,7 @@
<label>Spatial representation type</label>
<btnLabel>Add spatial representation type</btnLabel>
<description>Method used to spatially represent geographic information</description>
<condition>mandatory</condition>
</element>
<element name="gmd:spatialResolution" id="38.0">
<label>Spatial resolution</label>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,6 @@

<hasDuplicatedOnlineResource>Duplicated Online Resource URLs for the same language are not allowed. The following duplicate(s) (language; URL) were identified:</hasDuplicatedOnlineResource>

<SpatialRepresentationTypeMissing>Value is required for Spatial representation</SpatialRepresentationTypeMissing>

</strings>
1 change: 1 addition & 0 deletions src/main/plugin/iso19139.ca.HNAP/loc/fre/labels.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2665,6 +2665,7 @@
<label>Type de représentation spatiale</label>
<btnLabel>Ajouter type de représentation spatiale</btnLabel>
<description>Méthode utilisée pour représenter spatialement l'information géographique</description>
<condition>mandatory</condition>
</element>
<element name="gmd:spatialResolution" id="38.0">
<label>Résolution spatiale</label>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,6 @@

<hasDuplicatedOnlineResource>Les URL de ressources en ligne dupliquées pour la même langue ne sont pas autorisées. Les doublons suivants (langue ; URL) ont été identifiés :</hasDuplicatedOnlineResource>

<SpatialRepresentationTypeMissing>Une valeur est nécessaire pour: Type de représentation spatiale</SpatialRepresentationTypeMissing>

</strings>
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,9 @@

<sch:let name="isValid" value="($spatialRepresentationTypeCodelistLabel = '') or ($spatialRepresentationTypeCodelistLabel != gmd:MD_SpatialRepresentationTypeCode/@codeListValue)"/>

<sch:assert
test="$spatialRepresentationTypeCodelistLabel != '' "
>$loc/strings/SpatialRepresentationTypeMissing</sch:assert>
<sch:assert
test="$isValid"
>$loc/strings/InvalidSpatialRepresentationType</sch:assert>
Expand Down

0 comments on commit a47c0aa

Please sign in to comment.