Document generator sometimes generates optional elements when it should not [was #7871]
When generating an XML header from the built-in TEI-all schema with the options "Generate optional elements" off and "First choice of required choice" on, elements that are not required are generated, as well. E.g., the model for teiHeader as reported by the documentation is {quote}
Element : teiHeader
(TEI Header) supplies the descriptive and declarative information making up an electronic title page prefixed to
every TEI-conformant text.
Content Model : (fileDesc, ((encodingDesc | profileDesc))*, revisionDesc?) {quote}
However,
this is the generated TEI header element: (deeper levels removed) {code:xml}
I ([~vitt]) think the problem is in WST code, maybe the double group is confusing? Debugging entry point could be org.eclipse.wst.xml.core.internal.contentmodel.util.DOMContentBuilderImpl.visitCMElementDeclaration(CMElementDeclaration)