Schema question: sequences as choices in the content

Currently (0.21) this content specification gives an error:

content: “a | (b c)”

On other words, an instance may be ‘<a/>’ or ‘<b/><c/>’.

I understand that allowing this complicates the logic of what operations are allowed and what operations are not allowed.

Right, this is intentionally forbidden, to keep the performance and complexity of schema-constraint checking under control.

Ok, good to know. It’s certainly possible to work around this limitation by having separate schemas for editing and storing. The schema for editing would introduce a grouping element. For example: ‘<a/>’ or ‘<seq1><b/><c/></seq1>’

doc: { content: “a | seq1” }, seq1: { content: “b c” }