Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#1109 closed defect (fixed)

Some SECORE definitions are invalid

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

Description

Some user defintions are not valid, e.g. 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 validation error

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.

Change History (14)

comment:1 by Bang Pham Huu, 8 years ago

you just copy from me and assign to me. ok.

comment:2 by Dimitar Misev, 8 years ago

You can assign to someone else if you think they will do a better job :)

comment:3 by Bang Pham Huu, 8 years ago

I will assign to you this question.

Some small problem with user defined database I can solve like (change id → gml:id or elements's order,…). But I would like to ask about "xlink:href" inside some definition, for example this is a cs/0GC/0/CartesianIndexed1D and it is totally wrong in definition.

<CartesianCS 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="cartesian1D">
  <description/>
  <identifier codeSpace="http://www.ietf.org/rfc/rfc3986">http://www.opengis.net/def/cs/OGC/0/CartesianIndexed1D</identifier>
  <remarks>Initial version (0.1)</remarks>
  <axis>
      **** In here you can see a xlink:href ****
    <CoordinateSystemAxis xlink:href="http://www.opengis.net/def/axis/OGC/0/indexed"/>
  </axis>
</CartesianCS>

this is invalid syntax

The GML definition is not valid, please check error below
cvc-complex-type.3.2.2: Attribute 'id' is not allowed to appear in element 'CartesianCS'.
cvc-complex-type.4: Attribute 'id' must appear on element 'CartesianCS'.
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.

If I go to the xlink:href and get the needed content like (identifier, remarks, axisAbbre, axisDrirection) and add inside <CoordinateSystemAxis> like this, it will be valid. So can I do like this (I use content from xlink:href not create from mine)?

<CartesianCS 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" gml:id="cartesian1D">
  <description/>
  <identifier codeSpace="http://www.ietf.org/rfc/rfc3986">http://www.opengis.net/def/cs/OGC/0/CartesianIndexed1D</identifier>
  <remarks>Initial version (0.1)</remarks>
  <axis>
    <CoordinateSystemAxis gml:id="index-CS" uom="http://www.opengis.net/def/axis/OGC/0/indexed">
            <identifier codeSpace="http://www.ietf.org/rfc/rfc3986">http://www.opengis.net/def/cs/OGC/0/CartesianIndexed1D</identifier>
<remarks>Initial version (0.1)</remarks>
<axisAbbrev>index</axisAbbrev>
<axisDirection codeSpace="http://www.ietf.org/rfc/rfc3986">http://www.opengis.net/def/axisDirection/OGC/0/indexedAxisPositive</axisDirection> 
    </CoordinateSystemAxis>
  </axis>
</CartesianCS>


comment:4 by Bang Pham Huu, 8 years ago

I think with definition like this (using xlink:href which is not valid from GML Schema) and parameterize is exception and will not be fixed.

for example:


<CoordinateSystemAxis xlink:href="http://www.opengis.net/def/axis/OGC/0/indexed"/>

which is imported to create 5D Index

<CartesianCS 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="cartesian5D">
  <description/>
  <identifier codeSpace="http://www.ietf.org/rfc/rfc3986">http://www.opengis.net/def/cs/OGC/0/CartesianIndexed5D</identifier>
  <remarks>Initial version (0.1)</remarks>
  <axis>
    <CoordinateSystemAxis xlink:href="http://www.opengis.net/def/axis/OGC/0/indexed"/>
  </axis>
  <axis>
    <CoordinateSystemAxis xlink:href="http://www.opengis.net/def/axis/OGC/0/indexed"/>
  </axis>
  <axis>
    <CoordinateSystemAxis xlink:href="http://www.opengis.net/def/axis/OGC/0/indexed"/>
  </axis>
  <axis>
    <CoordinateSystemAxis xlink:href="http://www.opengis.net/def/axis/OGC/0/indexed"/>
  </axis>
  <axis>
    <CoordinateSystemAxis xlink:href="http://www.opengis.net/def/axis/OGC/0/indexed"/>
  </axis>
</CartesianCS>

I believe this is extension from someone to allow extend definition as he tried to change some little information but keep the xlink:href to the original definition. In this case, it should not modify anything in these definition (for example, I've copied the definition from the origin to the extension and it is not wise when I did not know correctly what it is used for).

in reply to:  3 ; comment:5 by Dimitar Misev, 8 years ago

Replying to bphamhuu:

If I go to the xlink:href and get the needed content like (identifier, remarks, axisAbbre, axisDrirection) and add inside <CoordinateSystemAxis> like this, it will be valid. So can I do like this (I use content from xlink:href not create from mine)?

<CartesianCS 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" gml:id="cartesian1D">
  <description/>
  <identifier codeSpace="http://www.ietf.org/rfc/rfc3986">http://www.opengis.net/def/cs/OGC/0/CartesianIndexed1D</identifier>
  <remarks>Initial version (0.1)</remarks>
  <axis>
    <CoordinateSystemAxis gml:id="index-CS" uom="http://www.opengis.net/def/axis/OGC/0/indexed">
            <identifier codeSpace="http://www.ietf.org/rfc/rfc3986">http://www.opengis.net/def/cs/OGC/0/CartesianIndexed1D</identifier>
<remarks>Initial version (0.1)</remarks>
<axisAbbrev>index</axisAbbrev>
<axisDirection codeSpace="http://www.ietf.org/rfc/rfc3986">http://www.opengis.net/def/axisDirection/OGC/0/indexedAxisPositive</axisDirection> 
    </CoordinateSystemAxis>
  </axis>
</CartesianCS>

Yes this sounds good, you can fix it like that and make a patch.

in reply to:  5 comment:6 by Bang Pham Huu, 8 years ago

yes, I like when I can do this. But…if I do this then this will be repetitive definition you can see Index 5D example (I've to copy 5 times definition from 1D).

http://www.rasdaman.org/ticket/1109?replyto=5#comment:4

So I would like to ask you again, do you agree with duplicate definition and for example, who change some element in original definition, then need to update all others importing definition?

comment:7 by Dimitar Misev, 8 years ago

Yes unfortunately this is how it should be done according to the schema.

comment:8 by Bang Pham Huu, 8 years ago

ok, thanks, then what about ParameterizedCRS, this is not defined in Schema. I have no idea to make it valid, then can I leave it?

comment:9 by Bang Pham Huu, 8 years ago

I've done all I can do with this mess when a lot of thing is repetitive. Except some definition in crs/OGC/0 which uses parametersize then I can not do anything.

You can view the diff in here https://www.diffchecker.com/sjbxoe6f.

comment:10 by Dimitar Misev, 8 years ago

This is the user db right? Good job, looks good!

comment:11 by Dimitar Misev, 8 years ago

I think in future we will not have this issue of invalid defs, as we have the validation check when adding a definition.

comment:12 by Bang Pham Huu, 8 years ago

yes, when someone create a new definition, he/she can check validate before submitting. So I'll make a patch for it now.

comment:13 by Bang Pham Huu, 8 years ago

Resolution: fixed
Status: newclosed

patch was accepted, close ticket.

comment:14 by Bang Pham Huu, 8 years ago

The problem from system test from Index2D so I had a mistake before without adding codespace identifier. With this addition now test is successful. (of course, test_secore need to update oracle but not belong to this ticket, will be added in ticket 732).

You can see the diff in here as I only added the URN inside the user dictionaries.
https://www.diffchecker.com/q6odfd1r

Note: See TracTickets for help on using tickets.