Woodstox XMLStreamWriter Config
StAX 1.0, XMLStreamWriter#IS_REPAIRING_NAMESPACES
In the default mode (disabled, "non-repairing mode"), Woodstox takes given namespace and prefix values as is, without trying to check for conflicts or reassing namespace prefixes (meaning it may produce non-well-formed output). Non-repairing mode usually works well enough if the structure is generated from scratch by a single process, or modifies (reads, writes pieces as is, adds/removes parts) a single XML input stream.
It is also faster of the modes, since no automatic handling of namespaces is done.
If the property is enabled ("repairing mode"), Woodstox will take passed-in prefix values only as suggestions, and will reassign prefixes as needed, including generating prefixes if none were passed. This mode is useful when either multiple processes or modules output XML, as no coordination about namespace mappings is needed. Also, when mixing XML input from multiple sources, automatic namespace resolution is useful, to prevent outputting invalid XML due to conflicting namespace prefixes. And finally, it is in general the most robust, even in others cases: for example, if parent elements of an input document are filtered out, it may be possible that matching declarations are cut out, and without repairing output content might have unbound namespaces.


