Child pages
  • Project Goals
Skip to end of metadata
Go to start of metadata


This project is developed for Java programmers who would like to use JAXB to work with XML schemas defined by the Open Geospatial Consortium, Inc (OGC).

OGC defines a number of standards (WMS, WFS, SLD etc.) which are widely used in GIS community. Many of these standards provide XML schemas (and sometimes DTDs) which define formats for XML documents.

When implementing GIS software in Java, developers often need to process XML data complying to these schemas. One of the popular technologies for XML processing is JAXB (Java Architecture for XML Binding).

JAXB Reference Implementation comes with a schema compiler called XJC which consumes an XML schema and generates classes specific to the originating schema (schema-derived classes). Unfortunately, compiling OGC schemas with XJC is not easy:

  • OGC schemas rarely compile "as is". You typically need to provide special "binding" file which customizes compilation (for instance, renames classes or properties and so on).
  • OGC schemas have a lot of dependencies.
  • Some of OGC schemas are not valid per se.
  • Some of OGC schemas are defined in several versions.

The OGC Schemas project is aimed to compile all (as many as possible) of the OGC Schemas with JAXB RI schema compiler in order to make them usable in Java GIS environments via JAXB. Beyond that this project also provides useful tools for working with GIS-related XML documents.

OGC schemas compilation

The primary goal of this project is to compile OGC schemas with JAXB schema compiler. More specifically, this goal has the following sub-goals and requirements.

Compile all the versions of all the schemas

OGC defines schemas in more than twenty standards, some schemas are provided in several versions. This projects aims to compile all of them, as long as it is possible. Some of the schemas (like 3.0.0 - 3.1.0 version of GML) are not valid, some of the schemas (like XLink) are only used in other schemas. These schemas will not be compiled but all the other schemas will be.

Allow simultaneous usage of different versions

In some applications it may be required to support and process different versions of the same schema (for instance, WMS 1.0.x, 1.1.x and 1.3.x).

Proper modularization

Many of the OGC schemas depend on other schemas via imports. Despite of that fact, we must support proper modularization. That is, each schema/version has its own artifact (JAR file) which contains classes and resources generated for this schema/version - but not more.


Example. SLD 1.1.0 depends on WMS 1.3.0. Nevertheless, sld-v_1_1_0-schema.jar will not contain WMS 1.3.0 classes. They will be contained in wms-v_1_3_0-schema.jar.

Proper dependencies

Dependencies between schemas are explicitly declared as dependencies between schema artifacts.


Examples. Since SLD 1.1.0 schema imports WMS 1.3.0 schema, sld-v_1_1_0-schema artifact will depend on wms-v_1_3_0-schema artifact.

  • No labels