ogc-schemas icon indicating copy to clipboard operation
ogc-schemas copied to clipboard

Support owc/1.0/

Open torse opened this issue 10 years ago • 14 comments

http://schemas.opengis.net/owc/1.0/

torse avatar Feb 20 '15 11:02 torse

Just to make it sure, you really need this:

http://schemas.opengis.net/owc/1.0/

And not this:

http://schemas.opengis.net/context/

Please confirm. OWC is "OGC Web Services Context Atom Standard", in RelaxNG.

highsource avatar Feb 20 '15 13:02 highsource

Yes, your first link is correct. We would need JSON bindings for OWC 1.0.0 (OWS Context or OGC Web Services Context Document) which is the successor to WMC 1.1.0/1.0.0. For a short description see: http://www.ogcnetwork.net/context

torse avatar Feb 20 '15 14:02 torse

Ok, thanks for the confirmation.

This is RelaxNG Compact, not an XML schema, I don't have aneough experience here - but I'll see what I can do.

highsource avatar Feb 20 '15 14:02 highsource

It's appreciated, thanks! But don't spend too much time on it, as it is not critical for us right now. Also, I just found that there are also (Geo)JSON binding rules defined as XSLT in a OGC PER, see: http://www.opengeospatial.org/standards/owc.

torse avatar Feb 20 '15 14:02 torse

I think Jsonix will be able to do this pretty well. I'll see what I can do.

highsource avatar Feb 20 '15 15:02 highsource

If you happen to have examples of XML/JSON pairs that would be very helpful. There are XML examples here but would be good to have JSON as well. Maybe with this XSLT...

highsource avatar Feb 20 '15 15:02 highsource

@torse As feared, everything's not easy:

  • highsource/maven-jaxb2-plugin#42

which is due to

  • https://java.net/jira/browse/JAXB-1065

highsource avatar Feb 26 '15 08:02 highsource

@torse

Even worse than that:

  • https://java.net/jira/browse/JAXB-1066
  • https://java.net/jira/browse/JAXB-1067

So RELAXNG compilation does not work (at all), unfortunately.

The option here is to create and compile XML Schemas.

highsource avatar Feb 26 '15 11:02 highsource

Ok, tried to convert this RELAXNG with trang (https://code.google.com/p/jing-trang/) to XSD. Got the following warnings. Not sure if that XSDs are safe to map?

$ java -jar trang-20091111/trang.jar owc/1.0.0/owc.rnc owc.xsd
/local/schemas/owc/1.0.0/owc.rnc:53:60: warning: choice between attributes and children cannot be represented; approximating
/local/schemas/owc/1.0.0/georss.rnc:39:16: warning: cannot represent required wildcard attribute; approximating
/local/schemas/owc/1.0.0/owc.rnc:87:12: warning: cannot represent required wildcard attribute; approximating
/local/schemas/owc/1.0.0/owc.rnc:88:9: warning: choice between attributes and children cannot be represented; approximating
/local/schemas/owc/1.0.0/atom_feed.rnc:26:44: warning: choice between attributes and children cannot be represented; approximating
/local/schemas/owc/1.0.0/atom_feed.rnc:173:22: warning: cannot represent required wildcard attribute; approximating
/local/schemas/owc/1.0.0/atom_feed.rnc:177:55: warning: choice between attributes and children cannot be represented; approximating
/local/schemas/owc/1.0.0/atom_feed.rnc:179:71: warning: choice between attributes and children cannot be represented; approximating
/local/schemas/owc/1.0.0/atom_feed.rnc:182:59: warning: choice between attributes and children cannot be represented; approximating
/local/schemas/owc/1.0.0/atom_feed.rnc:184:61: warning: choice between attributes and children cannot be represented; approximating

torse avatar Feb 27 '15 12:02 torse

Not sure if this helps, but here are some related links..

XSL to transform the OWC XML to JSON: https://github.com/opengeospatial/owscontext/tree/master/json/dev/trax/xslt

JSON versions of the official OWC examples transform with the above XSL: https://github.com/opengeospatial/owscontext/tree/master/json/dev/trax/json

torse avatar Feb 27 '15 13:02 torse

This would be good help, could you please send me the XSDs? I'll check bout the safety.

highsource avatar Feb 27 '15 14:02 highsource

Please find the trang generated XSD of OWC attached..

On 27/02/15 15:03, Alexey Valikov wrote:

This would be good help, could you please send me the XSDs? I'll check bout the safety.

— Reply to this email directly or view it on GitHub https://github.com/highsource/ogc-schemas/issues/47#issuecomment-76398611.

torse avatar Feb 27 '15 14:02 torse

@torse Would you please mail to valikov-at-gmx-net, attachment did not went through GitHub.

highsource avatar Feb 27 '15 15:02 highsource

Ok, just converted.

highsource avatar Feb 27 '15 16:02 highsource