Flattening XSD schema documents (HR-XML 3.0)

Sasha Borodin picture Sasha Borodin · Mar 29, 2010 · Viewed 14.5k times · Source

I have several "main" XSD documents, which import "supporting" XSD documents. These schema documents happen to be from the HR-XML 3.0 specification, in particular related to Background Screening.

For the purposes of code-generation and convenient single-file schema to reference in my WSDL, I am trying to "flatten" the schema. The imports should be resolved; and there should be no duplication between common (formerly imported) content.

I tried the Oxygen XML editor, which has a function specifically for that task; but this appears to support only one "main" document at a time - it is not possible to flatten/merge several "main" documents. I've also looked into XMLSpy, but it seems to be missing that functionality altogether.

Can anyone recommend specific tools, or offer general theory, behind this schema "flattening" process?

Thanks very much!

Answer