In case the generation of complex sets of documents with finely controlled variations is important to anybody, I mention a long-standing work which I have not yet open sourced - but could do so if interest should emerge. The concepts in short:
(1) Schema-guided document generation is a set of decisions of four kinds:
(a) maxOccurs>1: How many instances?
(b) minOccurs=0, maxOccurs=1: An instance or not?
(c) simple typed: Which text content?
(d) choice: Which branch?
(2) For every decision there is a default value; non-default decisions are specified by a config ("mockfig"); a decision includes (a) a decision target (typically selected by item name or (trailing) data path, supporting wildcards), (b) a decision value
(3) mockfig writing is supporting by code generation from underlying XSDs
(4) Numerous refinements supported (e.g. separation of common and specific settings and scenario-dependent decision values)
(5) Mockfigs are upgradable (XSD changes: automated adaptation where possible, manual adaptation supported by info messages)
Limitation: no support for mixed content.
As this little summary suggests, you can achieve any degree of control (from 0 to 100%), a degree correleted with the amount of configuration work. The framework is designed for large scale functional tests using 100s or 1000s of finely controlled message instances.
Cheers,
Hans-Jürgen
Anybody desiring more information is welcome to contact me in private. An extensive tutorial is available.