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

don't warn about most nesting #4

Closed
telic opened this issue Apr 20, 2015 · 4 comments
Closed

don't warn about most nesting #4

telic opened this issue Apr 20, 2015 · 4 comments

Comments

@telic
Copy link
Contributor

telic commented Apr 20, 2015

The NestingValidator doesn't need to be quite so picky. Most tags should be allowed to cross without warning or error, including self-nested tags.

There are a few exceptions:

  • sectioning elements (FRONTMATTER, BACKMATTER, DIV, ACT, SCENE) should not cross MARG or BRACEGROUP
  • ACT, SCENE, and DIV should not cross others of the same type
  • DIV should not cross FRONTMATTER or BACKMATTER
  • ORNAMENT should not cross lines
  • CL and LD should not cross each other
  • COL should not cross itself

All those mentioned above should be errors, not simply warnings.

@ubermichael
Copy link
Owner

If A can't split B, then can B split A?

This is a split warning:

<WORK><A><B></A></B></WORK>

Is this?

<WORK><B><A></B></A></WORK>

@telic
Copy link
Contributor Author

telic commented Apr 24, 2015

I can't think of any case where it wouldn't be symmetric. A splits B at the same time that B splits A.

@ubermichael
Copy link
Owner

Add a schema attribute on Tag, noSplit="HW, S, FOO" etc.

@telic
Copy link
Contributor Author

telic commented Nov 29, 2015

Missing from the list above: SIG, RT, PN, and CW should never cross one another either.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants