-
Notifications
You must be signed in to change notification settings - Fork 96
attempted fix for #2758 #2759
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
attempted fix for #2758 #2759
Conversation
P5/Source/Specs/sp.xml
Outdated
| <alternate> | ||
| <alternate minOccurs="1" maxOccurs="unbounded"> | ||
| <classRef key="model.global"/> | ||
| <elementRef key="speaker"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would allow any number of speaker elements at any position inside sp, wouldn't it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with Carsten!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this solution is overly permissive in that sense—particularly in allowing <speaker> anywhere. (Changing it to zero or one is probably not so big a problem to fix as limiting where it can occur.) We could add Schematron to constrain it further, and I figured it would hold if we can't find a better way quickly! (But I suspect we can.) I hope this is at least a starting point for a better solution.
…is not required and b) it is deterministic (aka non-ambiguous)
… content model a bit.
|
@ebeshero opened this PR, and thus apparently cannot be a reviewer. Nonetheless, if anyone can check this branch out and test to see if your In the meantime we should start setting up for a patch release soon. (E.g., establish Jenkins jobs.) |
|
Okay, I can confirm that @sydb 's fix not only passes tests, but is also working when I build tei_all.rng and validate my test file (attached).
So I think this will suffice for a patch. But I am wondering if we really want to continue with the complexity of this new content model for <content>
<sequence>
<classRef key="model.global" minOccurs="0" maxOccurs="unbounded"/>
<alternate>
<sequence>
<sequence minOccurs="1" maxOccurs="unbounded">
<classRef key="model.stageLike" minOccurs="1" maxOccurs="1"/>
<classRef key="model.global" minOccurs="0" maxOccurs="unbounded"/>
</sequence>
<alternate>
<sequence>
<elementRef key="speaker" minOccurs="1" maxOccurs="1"/>
<classRef key="model.global" minOccurs="0" maxOccurs="unbounded"/>
<sequence minOccurs="1" maxOccurs="unbounded">
<alternate minOccurs="1" maxOccurs="1">
<elementRef key="lg"/>
<classRef key="model.lLike"/>
<classRef key="model.pLike"/>
<classRef key="model.listLike"/>
<classRef key="model.attributable"/>
<elementRef key="q"/>
<classRef key="model.stageLike"/>
</alternate>
<classRef key="model.global" minOccurs="0" maxOccurs="unbounded"/>
</sequence>
</sequence>
<sequence>
<alternate minOccurs="1" maxOccurs="1">
<elementRef key="lg"/>
<classRef key="model.lLike"/>
<classRef key="model.pLike"/>
<classRef key="model.listLike"/>
<classRef key="model.attributable"/>
<elementRef key="q"/>
</alternate>
<classRef key="model.global" minOccurs="0" maxOccurs="unbounded"/>
<sequence minOccurs="0" maxOccurs="unbounded">
<alternate minOccurs="1" maxOccurs="1">
<elementRef key="lg"/>
<classRef key="model.lLike"/>
<classRef key="model.pLike"/>
<classRef key="model.listLike"/>
<classRef key="model.attributable"/>
<elementRef key="q"/>
<classRef key="model.stageLike"/>
</alternate>
<classRef key="model.global" minOccurs="0" maxOccurs="unbounded"/>
</sequence>
</sequence>
</alternate>
</sequence>
<sequence>
<elementRef key="speaker" minOccurs="1" maxOccurs="1"/>
<classRef key="model.global" minOccurs="0" maxOccurs="unbounded"/>
<sequence minOccurs="1" maxOccurs="unbounded">
<alternate minOccurs="1" maxOccurs="1">
<elementRef key="lg"/>
<classRef key="model.lLike"/>
<classRef key="model.pLike"/>
<classRef key="model.listLike"/>
<classRef key="model.attributable"/>
<elementRef key="q"/>
<classRef key="model.stageLike"/>
</alternate>
<classRef key="model.global" minOccurs="0" maxOccurs="unbounded"/>
</sequence>
</sequence>
<sequence>
<alternate minOccurs="1" maxOccurs="1">
<elementRef key="lg"/>
<classRef key="model.lLike"/>
<classRef key="model.pLike"/>
<classRef key="model.listLike"/>
<classRef key="model.attributable"/>
<elementRef key="q"/>
</alternate>
<classRef key="model.global" minOccurs="0" maxOccurs="unbounded"/>
<sequence minOccurs="0" maxOccurs="unbounded">
<alternate minOccurs="1" maxOccurs="1">
<elementRef key="lg"/>
<classRef key="model.lLike"/>
<classRef key="model.pLike"/>
<classRef key="model.listLike"/>
<classRef key="model.attributable"/>
<elementRef key="q"/>
<classRef key="model.stageLike"/>
</alternate>
<classRef key="model.global" minOccurs="0" maxOccurs="unbounded"/>
</sequence>
</sequence>
</alternate>
</sequence>
</content>
Is it too much? Would introducing |
|
Also @sydb , whether you take that as a review or not, I think in the interests of time, any one of us should review your solution on this branch. The fact that I made the branch shouldn't matter at this point. I will argue that a simpler content model might be desirable for human readability. Whether mine is too simple depends on how imperative we find constraining the position of |
|
Keep in mind the content model is a lot simpler after we create the “spPart_con” and “spPart_sans” classes (or macros), whatever they may be named. |
|
BTW, I do not think this PR should be accepted as-is — the changes in "ebb-fix-#2758" should be merged into a new "release-4.10.2" branch, not "dev" (which is what this PR would do). |
|
Adding stage to model.global would permit retaining the constraint that speaker if present must precede what is spoken which i think is important. And is obviously much simpler. |
|
The proposed content model requires |
|
@sydb my point was not that the proposed content model doesn't do the jpob -- clearly it does. My point is that the same objective might be obtained with a much simpler content model , just by making stage a global element. And simplicity and consequent explainability are desirable. |
|
Closing this PR since we transferred to the work of it to the 4.10.2 release branch, made from 4.10.1. |
@sydb @martindholmes @raffazizzi : This branch isn't passing tests yet, but I think we need a few more eyes on it to figure out how to fix it.
It's an attempt to solve #2758 on the way to (most likely) another patch release.