#1113 closed defect (fixed)

SECORE query incorrect data from GML db

Reported by: bphamhuu Owned by: bphamhuu
Priority: major Milestone: 9.2
Component: secore Version: development
Keywords: invalid definition Cc: dmisev
Complexity: Medium


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.



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


// 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 Changed 22 months ago by bphamhuu

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


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]
 if (exists($d)) then $d
 else <empty/>

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

comment:2 Changed 21 months ago by bphamhuu

  • Resolution set to fixed
  • Status changed from new to closed

patch was accepted, close ticket.

Note: See TracTickets for help on using tickets.