Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Metadata 1 3 missing schemalocation #397

Merged
merged 3 commits into from
Jan 30, 2020
Merged
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
14 changes: 9 additions & 5 deletions metadata/1.3/xml/ets-md-xml-bsxets.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
<b>This is a draft version. It has limitations and is expected to contain errors.</b> Please report any issues or problems <a href="https://github.com/inspire-eu-validation/community/wiki/Your-feedback" target="_blank">in GitHub</a>.<br/><br/>
Source: <a href="http://inspire.ec.europa.eu/id/ats/metadata/1.3/xml-encoding" target="_blank">Conformance Class 'XML encoding of ISO 19115/19119 metadata'</a>]]></description>
<reference>../../../inspire-md-bsxets.xq</reference>
<version>0.2.0</version>
<version>0.2.1</version>
<author>interactive instruments GmbH</author>
<creationDate>2016-08-30T00:00:00Z</creationDate>
<lastEditor>interactive instruments GmbH</lastEditor>
<lastUpdateDate>2017-02-21T17:00:00Z</lastUpdateDate>
<lastUpdateDate>2020-01-30T15:40:00Z</lastUpdateDate>
<tags>
<tag ref="EID54d5f755-e20c-40a7-ab72-5600c71dd049"/>
</tags>
Expand Down Expand Up @@ -98,9 +98,11 @@ let $messages :=
else
for $file in $db
return
if ($file/element()/@xsi:schemaLocation) then
if ($file/element()) 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
if (not($file/element()/@xsi:schemaLocation)) 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 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 }
else
try{ validate:xsd($file) } catch * { $err:description }
Expand All @@ -112,7 +114,9 @@ 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 (not($record/element()/@xsi:schemaLocation)) 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 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
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