This is an additional feature request. In addition to flattening all the files (#131) , an option should merge all files that are compatible so as to produce a schema with as few files as possible.
Turns out multiple different vendors of XML systems have products which assumed XML schemas consist of one (typically) or only a few files. A flattened schema helps, but sometimes users must enter every file name of the entire flattened schema into a GUI dialog one by one. A schema containing 100+ files remains very tedious to set up.
The simplest packaging of an XSD without loss of generality is one file per combination of
- target namespace (or no namespace)
and XSD attributes of the xs:schema which apply lexically to the schema document:
- elementFormDefault
- attributeFormDefault
- blockDefault
- finalDefault
- version
- id
- xml:lang
- defaultAttributes (XSD 1.1 only)
- xpathDefaultNamespace (XSD 1.1 only)
all of which are rarely used (and some are not even allowed in DFDL schemas).
Schema files also must have compatible (non-conflicting) namespace prefix definitions including any default namespace.
And for DFDL schemas, they must have identical top level dfdl:format definitions.
The point is to reduce the number of schema files to the smallest number possible.
I would also suggest that when tools generate large XSD/DFDL schemas, they should avoid creating large numbers of files due to this unfortunate, but pervasive, limitation found in many XML Schema based tools and systems.
This is an additional feature request. In addition to flattening all the files (#131) , an option should merge all files that are compatible so as to produce a schema with as few files as possible.
Turns out multiple different vendors of XML systems have products which assumed XML schemas consist of one (typically) or only a few files. A flattened schema helps, but sometimes users must enter every file name of the entire flattened schema into a GUI dialog one by one. A schema containing 100+ files remains very tedious to set up.
The simplest packaging of an XSD without loss of generality is one file per combination of
and XSD attributes of the xs:schema which apply lexically to the schema document:
all of which are rarely used (and some are not even allowed in DFDL schemas).
Schema files also must have compatible (non-conflicting) namespace prefix definitions including any default namespace.
And for DFDL schemas, they must have identical top level dfdl:format definitions.
The point is to reduce the number of schema files to the smallest number possible.
I would also suggest that when tools generate large XSD/DFDL schemas, they should avoid creating large numbers of files due to this unfortunate, but pervasive, limitation found in many XML Schema based tools and systems.