Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lack of standardization for collection metadata response with application/xml media type #58

Closed
rouault opened this issue Mar 5, 2018 · 5 comments · Fixed by #108
Closed
Assignees
Labels

Comments

@rouault
Copy link
Contributor

rouault commented Mar 5, 2018

As far as I can see in the spec, there's no XML schema defined for the collection metadata response with application/xml metadata type

For example,
$ curl -s -H "Accept: application/xml" "https://www.ldproxy.nrw.de/kataster" | xmllint --format -

returns

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<wfs:Collections xmlns:wfs="http://www.opengis.net/wfs/3.0">
  <wfs:Collection>
    <wfs:name>flurstueck</wfs:name>
    <wfs:title>Flurstück</wfs:title>
    <wfs:extent>
      <wfs:bbox>5.61272621360749</wfs:bbox>
      <wfs:bbox>50.2373512077239</wfs:bbox>
      <wfs:bbox>9.58963433710139</wfs:bbox>
      <wfs:bbox>52.5286304537795</wfs:bbox>
    </wfs:extent>
  </wfs:Collection>
  <wfs:Collection>
    <wfs:name>gebaeudebauwerk</wfs:name>
    <wfs:title>Gebäude, Bauwerk</wfs:title>
    <wfs:extent>
      <wfs:bbox>5.61272621360749</wfs:bbox>
      <wfs:bbox>50.2373512077239</wfs:bbox>
      <wfs:bbox>9.58963433710139</wfs:bbox>
      <wfs:bbox>52.5286304537795</wfs:bbox>
    </wfs:extent>
  </wfs:Collection>
  <wfs:Collection>
    <wfs:name>verwaltungseinheit</wfs:name>
    <wfs:title>Verwaltungseinheit</wfs:title>
    <wfs:extent>
      <wfs:bbox>5.61272621360749</wfs:bbox>
      <wfs:bbox>50.2373512077239</wfs:bbox>
      <wfs:bbox>9.58963433710139</wfs:bbox>
      <wfs:bbox>52.5286304537795</wfs:bbox>
    </wfs:extent>
  </wfs:Collection>
</wfs:Collections>

but it is not immediately obvious that this is howl https://github.com/opengeospatial/WFS_FES/blob/master/core/openapi/schemas/content.yaml should be encoded in XML

@cportele
Copy link
Member

cportele commented Mar 6, 2018

Yes, this is a weak area. Originally we had XML annotations in the OpenAPI fragments (link), but removed them because the way OpenAPI currently supports XML is kind of messy and likely to change (based on some discussions in the OpenAPI issues). I guess you are right and we should specify an explicit XML schema for the resource, when XML is used.

@pvretano
Copy link
Contributor

pvretano commented Mar 6, 2018

I generated a schema for this at http://www.pvretano.com/schemas/wfs/3.0/wfs.xsd
Some caveats:

  1. I created this file by copying the 2.5 schema and migrating it to 3.0. Most of it is not applicable but I figure over time I can prune the file to get rid of the stuff we no longer use.
  2. I really did not like the use of the wfs:extent and wfs:box elements so I used the ows:WGS84BoundingBox element instead. If the goal is to break any dependency with OWS Common then I think we should pull the WGS84BoundingBox element into the WFS 3.0 namespace thus breaking the dependency.

Another option might be to look at how ATOMPUB defines collections and extend slightly for spatial.

@cportele
Copy link
Member

Discussion in web-meeting 2018-03-12: Include schema for XML in first draft release.

@cportele
Copy link
Member

Work in progress: http://pvretano.com/schemas/wfs/3.0/wfs.xsd

@cportele
Copy link
Member

Discussion on 2018-03-27: The schema should be available in a few days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Development

Successfully merging a pull request may close this issue.

3 participants