Skip to content

Compiling Large Schema Sets

highsource edited this page Oct 25, 2014 · 2 revisions

Compiling large schema sets

XML Schema is often used to standardize information exchange in certain subject areas or industries. This often results in large sets of schemas. In this guide I will refer to http://schemas.opengis.net which provide XML Schemas for OGC standards.

These schemas often have some or all of the following characteristics:

  • Large set of schemas.
  • Available from some schema repository on the web.
  • Referencing each other via includes and imports.
  • Includes and imports sometimes via absolute and sometimes via relative URLs.
  • Versioned. Sometimes the version is included into the namespace URI (example: http://www.opengis.net/gml/3.2).
  • Sometimes containing errors (invalid schemas) and sometimes constructs not supported by JAXB/XJC.
  • Often producing naming collisions during compilation (colliding property and class names and colliding methods in the object factory) and all kinds of other compilation problems.

So compiling such sets may be quite a challenge.

This document aims to provide some guidance on this subject. It is largely based on experiences I've made in the frame of the OGC Schemas project which compiles schemas from http://schemas.opengis.net.

WORK IN PROGRESS

Based on the following discussion:

https://github.com/highsource/maven-jaxb2-plugin/issues/12

Clone this wiki locally