I think you're right: ModeShape cannot handle initial content with multiple root nodes. Please feel free to add an enhancement request. The easiest way would probably be to support multiple "mode:initialContent" elements (though there are other options, too).
An implementation-independent way to add initial content would be for your application to use the JCR API and check for the desired structure and, if missing, add it. This is all our limited "initial content" feature is doing.
Since we'd like to implement this feature for 3.x as well, what format do you think would be better/easier to work with, in this case ?
IMO, since we are talking about initial content, one of the goals should be that it's as easy as possible to quickly create such content - e.g. node hierarchies with properties, instead of having a format which supports advanced JCR concepts (like versioning for example)
Some of the options are:
- XML - we can extend the format used in 2.x, like Randall suggested
- JSON - what structure do you think would be better suited for this - one option is to use a similar structure to our RestService
- something else
Please fell free to add you suggestions either here, or in JIRA: https://issues.jboss.org/browse/MODE-1564