Opened 9 years ago

Closed 9 years ago

#1106 closed defect (fixed)

secore definitions should not be 'expanded' by default

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

Description

SECORE by default returns expanded definitions, where the href URLs are replaced by the content they point to. This returns an invalid XML definition.

So by default SECORE should return non-expanded definitions (?expand=0). Petascope should accordingly be adjusted to explicitly call SECORE with ?expand=full.

Change History (9)

comment:1 by Bang Pham Huu, 9 years ago

Actually some user defintion GML is not valid from definition without considering HREF to another definitions. This ticket can help with ticket http://www.rasdaman.org/ticket/732 but need to consider when say SECORE has a 100% percent valid definition, see below for explanation.

i.e http://kahlua.eecs.jacobs-university.de:8080/def/cs/OGC/0/Seconds/browse.jsp

<TimeCS xmlns="http://www.opengis.net/gml/3.2" xmlns:epsg="urn:x-ogp:spec:schema-xsd:EPSG:1.0:dataset" xmlns:gml="http://www.opengis.net/gml/3.2" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:rim="urn:oasis:names:tc:ebxml-regrep:xsd:rim:3.0" id="seconds-cs">
  <description>1D coordinate system containing a time axis measuring seconds [s].</description>
  <identifier codeSpace="http://www.ietf.org/rfc/rfc3986">http://www.opengis.net/def/cs/OGC/0/Seconds</identifier>
  <remarks>Initial version (0.1)</remarks>
  <axis>
    <CoordinateSystemAxis xlink:href="http://www.opengis.net/def/axis/OGC/0/seconds"/>
  </axis>
</TimeCS>

has some error when valid from definition. So we cannot say 100% that with "?expand=0" all GML in SECORE is valid, I think 80 -90 % of userdb is not valid, but at least from gml database, it will be valid (80 - 90 %).

cvc-complex-type.3.2.2: Attribute 'id' is not allowed to appear in element 'TimeCS'.
cvc-complex-type.4: Attribute 'id' must appear on element 'TimeCS'.
cvc-complex-type.3.2.2: Attribute 'xlink:href' is not allowed to appear in element 'CoordinateSystemAxis'.
cvc-complex-type.4: Attribute 'uom' must appear on element 'CoordinateSystemAxis'.
cvc-complex-type.4: Attribute 'id' must appear on element 'CoordinateSystemAxis'.
cvc-complex-type.2.4.b: The content of element 'CoordinateSystemAxis' is not complete. One of '{"http://www.opengis.net/gml/3.2":metaDataProperty, "http://www.opengis.net/gml/3.2":description, "http://www.opengis.net/gml/3.2":descriptionReference, "http://www.opengis.net/gml/3.2":identifier}' is expected.

comment:2 by Dimitar Misev, 9 years ago

Then this definition (and the other that are invalid with expand=0) need to be fixed.

comment:3 by Bang Pham Huu, 9 years ago

please create a ticket, sir.

Version 0, edited 9 years ago by Bang Pham Huu (next)

comment:4 by Bang Pham Huu, 9 years ago

it is fun when after long time, you want to change it from "full" to 0 (http://www.rasdaman.org/ticket/365). I think it is not convenient to add "?expand=0" after the link, and URN also not define with "?expand=0". So I suggest default without any parameter then just show unresolved definition, and if user want to see the full resolved definition, need to add argument "?expand=full".

My question is if someone using SECORE to get definition and does not know about this with their old system, do you think has a problem? because their application cannot parse full detail XML as before.

Last edited 9 years ago by Bang Pham Huu (previous) (diff)

comment:5 by Dimitar Misev, 9 years ago

Yes that's what I mean default is expand=0, when you have URL like http://localhost:8080/def/crs/EPSG/0/4326, it is not expanded by default.

I don't think anyone besides petascope is parsing secore definitions. And this was the original behaviour of the OGC resolver btw. It was wrong to expand by default as this creates an invalid definition, we just didn't realize it earlier.

comment:6 by Bang Pham Huu, 9 years ago

I think if you want to hide the "validation" of GML by this way, it is not correct. Have a look in here http://rasdaman.org/ticket/732#comment:6. I agree with you before when you wanted to expand=full when query. I need to make SECORE have correct behavior not just hide what it is wrong when one validate the resolved definition with GML Schema.

So do you agree keep everything like before and focus on fixing SECORE with correct behavior in my comment?

comment:7 by Dimitar Misev, 9 years ago

Agreed, I'm still not sure though if it's better to return expanded or not expanded definition by default.

comment:8 by Bang Pham Huu, 9 years ago

ok, thanks for your agreement, we should make everything clear as possible (expanded) for people can take benefit when they can easily parse "needed" information :). Then you can close this ticket here.

comment:9 by Dimitar Misev, 9 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.