Skip to content

Commit

Permalink
Merge pull request #367 from inspire-eu-validation/issue-161
Browse files Browse the repository at this point in the history
Add support for new schemaLocation links on MD 1.3
Corresponding community issue: #161
  • Loading branch information
josemasensio authored Nov 21, 2019
2 parents 75242b2 + ad20caa commit 745eed6
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions metadata/1.3/xml/ets-md-xml-bsxets.xml
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,9 @@ let $messages :=
return
if ($file/element()/@xsi:schemaLocation) then
let $result :=
if ( contains($file/element()/@xsi:schemaLocation, 'http://standards.iso.org/ittf/PubliclyAvailableStandards/ISO_19139_Schemas/gmd/gmd.xsd') or contains($file/element()/@xsi:schemaLocation, 'http://www.isotc211.org/2005/gmd/gmd.xsd')) then
try{ validate:xsd($file, 'https://inspire.ec.europa.eu/draft-schemas/inspire-md-schemas-temp/apiso-inspire/apiso-inspire.xsd') } catch * { $err:description }
if (contains($file/element()/@xsi:schemaLocation, 'http://standards.iso.org/ittf/PubliclyAvailableStandards/ISO_19139_Schemas/gmd/gmd.xsd') or contains($file/element()/@xsi:schemaLocation, 'http://schemas.opengis.net/iso/19139/20070417/gmd/gmd.xsd') or contains($file/element()/@xsi:schemaLocation, 'http://www.isotc211.org/2005/gmd/gmd.xsd') or contains($file/element()/@xsi:schemaLocation, 'http://schemas.opengis.net/csw/2.0.2/profiles/apiso/1.0.0/apiso.xsd')) then
try{
validate:xsd($file, 'https://inspire.ec.europa.eu/draft-schemas/inspire-md-schemas-temp/apiso-inspire/apiso-inspire.xsd') } catch * { $err:description }
else
try{ validate:xsd($file) } catch * { $err:description }
return
Expand All @@ -112,7 +113,7 @@ let $messages :=
for $record in $records
let $rid := $record/gmd:fileIdentifier/*/text()
let $result :=
if ( contains($record/element()/@xsi:schemaLocation, 'http://standards.iso.org/ittf/PubliclyAvailableStandards/ISO_19139_Schemas/gmd/gmd.xsd') or contains($record/element()/@xsi:schemaLocation, 'http://www.isotc211.org/2005/gmd/gmd.xsd')) then
if ( contains($file/element()/@xsi:schemaLocation, 'http://standards.iso.org/ittf/PubliclyAvailableStandards/ISO_19139_Schemas/gmd/gmd.xsd') or contains($file/element()/@xsi:schemaLocation, 'http://schemas.opengis.net/iso/19139/20070417/gmd/gmd.xsd') or contains($file/element()/@xsi:schemaLocation, 'http://www.isotc211.org/2005/gmd/gmd.xsd') or contains($file/element()/@xsi:schemaLocation, 'http://schemas.opengis.net/csw/2.0.2/profiles/apiso/1.0.0/apiso.xsd')) then
try{ validate:xsd($record, 'https://inspire.ec.europa.eu/draft-schemas/inspire-md-schemas-temp/apiso-inspire/apiso-inspire.xsd') } catch * { $err:description }
else
try{ validate:xsd($record) } catch * { $err:description }
Expand Down

0 comments on commit 745eed6

Please sign in to comment.