-
Notifications
You must be signed in to change notification settings - Fork 92
modifying Schematron constraint in ab for #1988 #2161
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
Conversation
@martinascholger @martindholmes @sydb I think this is ready to pull in to resolve #1988. Take a look and see if you agree? |
Looks good to me! Thanks @ebeshero. |
@sydb Looking at this again, I remember why the Schematron needs to test for So, we absolutely need to make sure that the I posted my test TEI file for this issue on the ticket: #1988 (comment) |
Just a quick question:
and another proposal:
|
The schematron constraint should presumably apply to all members of model. PLike. But I don't know if the odd processors handle classSpec/constraintSpec correctly or at all. |
@lb42 That's a really good question. I'm going to raise a ticket for the Stylesheets group to investigate it. We already have some problems with constraints defined at the attribute level, and in my own projects I make a point of putting all the Schematron at the schemaSpec level and using full contexts, but that can't work for something based on a model because the information about model members is not there in the instance document. |
@peterstadler @martindholmes I think I lost track of the issue for |
By "add it", I mean, check in and modify the Schematron constraint for |
@ebeshero That would solve the problem until we get around to looking at TEIC/Stylesheets#519. |
Just noting that there's a similar constraint already on <constraintSpec ident="abstractModel-structure-l" scheme="schematron">
<constraint>
<report xmlns="http://purl.oclc.org/dsdl/schematron" xmlns:tei="http://www.tei-c.org/ns/1.0" test="ancestor::tei:l[not(.//tei:note//tei:p[. = current()])]">
Abstract model violation: Lines may not contain higher-level structural elements such as div, p, or ab.
</report>
</constraint>
</constraintSpec> I'll change that to make it more like the new rule to cover One more thing I discovered: Try nesting a I wish we could just make one fresh constraintSpec on |
I've enlarged my test file a bit to test with |
The issue with
And it needs to be:
(And it needed a test for the similar situation with |
Move EBB’s excellent abstract model poem from its own file into detest.xml, where the build process (i.e., Makefile) will validate it against detest.odd.
I suspect we should just go with the changes @ebeshero has made here, for now, as we are only days away from freeze. But that said, I have an alternate solution that I think will work, and might lend itself quite well to being an abstract pattern, methinks. See |
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 tested against the test file with errors, and added a few more conditions. These did the right thing, at least in those cases. So while it may not be perfect, it does seem to be better than what we had.
modifying Schematron constraint in ab for #1988
This is a repair to the Schematron constraint in
<ab>
to resolve #1988. It's working with a test build on my branch.