Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Element content models with valList should not have any other content #1862

Closed
martindholmes opened this issue Mar 18, 2019 · 3 comments
Closed

Comments

@martindholmes
Copy link
Contributor

martindholmes commented Mar 18, 2019

This arises out of the Stylesheets working group meeting on TEIC/Stylesheets#365.

We notice that the content model of <content> allows <valList> to be in alternation or sequence with other content model parts such as <elementRef> or <sequence>. We believe that such constructions are fundamentally mysterious -- what does it mean to say that something has a closed value list but then has a text node, for instance? -- and that practically speaking, using a <valList> in an element's content model only makes sense if that's the only thing you want to be in there.

So we think that the content model of <content> should be changed such that it may either be <valList> or the current model without <valList>.

@lb42
Copy link
Member

lb42 commented Aug 8, 2019

I agree that it's hard to see what it would mean to combine a valList in sequence with other members of model.contentPart, but the current model is intended to permit an alternation, which doesn't seem unreasonable.

@martindholmes
Copy link
Contributor Author

Council F2F says that such combinations are impossible to process into a workable schema, and there is no imaginable use-case for them, so we should disallow them.

@peterstadler peterstadler added this to the Guidelines 3.7.0 milestone Sep 16, 2019
sydb added a commit that referenced this issue Feb 7, 2020
1. removed <valList> from model.contentPart
2. put <valList> directly into content model of <content> and <alternate> — but such that it cannot be in sequence with other stuff
3. (Did NOT put <valList> directly into content model of <sequence>.)
@sydb
Copy link
Member

sydb commented Feb 7, 2020

  1. removed <valList> from model.contentPart
  2. put <valList> directly into content model of <content> and <alternate> — but such that it cannot be in sequence with other stuff
  3. (Did not put <valList> directly into content model of <sequence>.)

Tested locally, seemed fine. Thus closing in anticipation that Mr. Jenkins is happy.

@sydb sydb closed this as completed Feb 7, 2020
hcayless pushed a commit that referenced this issue Jun 26, 2022
1. removed <valList> from model.contentPart
2. put <valList> directly into content model of <content> and <alternate> — but such that it cannot be in sequence with other stuff
3. (Did NOT put <valList> directly into content model of <sequence>.)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants