Opened 9 years ago

Closed 9 years ago

#1113 closed defect (fixed)

SECORE query incorrect data from GML db

Reported by: Bang Pham Huu Owned by: Bang Pham Huu
Priority: major Milestone: 9.2
Component: secore Version: development
Keywords: invalid definition Cc: Dimitar Misev
Complexity: Medium

Description

With the support of "validation tool" in /def/browse.jsp, I've found a bug with SECORE when query data (in short: it is duplicate) and make the resolved definition is invalid.

Example:

http://kahlua.eecs.jacobs-university.de:8080/def/area/EPSG/0/1281/browse.jsp

It will return 2 <AreaOfUse> and the second is put outside of <ExtentDefinition>. The first <AreaOfUse> is correct from definition.

</epsg:ExtentDefinition>

// From here is not correct (duplicate) and make it not well-formed

XML is not well-formed: The markup in the document following the root element must be well-formed. 

<epsg:AreaOfUse xmlns:gml="http://www.opengis.net/gml/3.2" xmlns:epsg="urn:x-ogp:spec:schema-xsd:EPSG:1.0:dataset" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:rim="urn:oasis:names:tc:ebxml-regrep:xsd:rim:3.0">
  <gmd:description xmlns:gmd="http://www.isotc211.org/2005/gmd">

Change History (2)

comment:1 by Bang Pham Huu, 9 years ago

The problem was due to only all "area" definition has 2 identifiers elements and it has error

from
http://www.opengis.net/def/area/EPSG/0/1024
to
http://www.opengis.net/def/area/EPSG/0/4196

that means your query had problem as it query 2 times in 1 definition. Solution, just query 1 time in 1 definition with (…)[1]

declare namespace gml = "http://www.opengis.net/gml/3.2";
let $d := (collection('gml')//gml:identifier[ends-with(.,'/def/crs/EPSG/0/4326')]/..)[1]
return
 if (exists($d)) then $d
 else <empty/>

I'll test it (add test case) and have a patch soon.

comment:2 by Bang Pham Huu, 9 years ago

Resolution: fixed
Status: newclosed

patch was accepted, close ticket.

Note: See TracTickets for help on using tickets.