opengeospatial / ets-gpkg12-nsg

Other
2 stars 5 forks source link

Test metadataSchemaValidation fails if table gpkg_metadata contains multiple values with at least one not NMIS valid entry #30

Closed lgoltz closed 6 years ago

lgoltz commented 6 years ago

Failing test: org.opengis.cite.gpkg12.nsg.metadata.MetadataTests#metadataSchemaValidation()

Requirement is not described in the test. Probably it is:

NSG Req 12: A GeoPackage SHALL contain one complete NMIS metadata XML instance 
document that describes the entire GeoPackage in a gpkg_metadata table row with the 
contents shown in below.

Test executes the following SQL-Statement SELECT metadata from gpkg_metadata;. All results are validated against the nmis.xsd.

If the SQL Statement returns e.g. the following three rows the test fails:

d1eea157-4f94-4852-9fde-bf8d9327e6d1
------------------------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<nas:MD_Metadata xmlns:gco="http://www.isotc211.org/2005/gco" xmlns:gmd="http://www.isotc211.org/2005/gmd" xmlns:gmi="http://www.isotc211.org/2005/gmi" xmlns:gml="http://www.opengis.net/gml/3.2" xmlns:ism="urn:us:gov:ic:ism" xmlns:nas="http://metadata.ces.mil/dse/ns/GSIP/5.0/nas" xmlns:ntk="urn:us:gov:ic:ntk" xmlns:swe="http://www.opengis.net/swe/2.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ism:DESVersion="9" ism:classification="U" ism:createDate="2018-04-17" ism:ownerProducer="USA" ism:resourceElement="true" ntk:DESVersion="7" xsi:schemaLocation="http://metadata.ces.mil/dse/ns/GSIP/5.0/nas ./nas/nmis.xsd">
<gmd:hierarchyLevel>
...
</nas:MD_Metadata>
------------------------------------------------------------
ALL
lgoltz commented 6 years ago

Currently "java.lang.AssertionError: Failed to read XML resource. Content is not allowed in prolog." is reported if one metadata entry is a simple string (not XML).