The trouble with your first solution is that it's likely to break things quite badly for people using <app> to record an existing apparatus from a printed source, for whom the availability of model.global elements like <pb/> or <lb/> or even <gap/> within <app> is actually quite reasonable and not "nuts" at all. You might prefer it if <app> became a purely data-only construct, but that's really quite a shift from its current model. So I don't think coming up with such a radically different content model for it counts as a simple bug fix. The argument "should never have been allowed in the first place" is a very dangerous one. How would your solution (2) work exactly? On 13/10/15 13:20, Hugh Cayless wrote:
I think we’re going to have to do a point release. Most of the Stylesheets errors are fixable just by regenerating the expected results, but the tests revealed a bug via Odd by Example, which won’t produce a valid XSD content model for <app>. The short version is, that by adding <app> to model.global.edit, <app>’s own rather messed up content model causes an invalid XSD to be generated (it permits model.global inside it). There are two possible fixes for this:
1) Fix <app>’s content model, which I think is actually seriously incorrect. It should be more like the content model of <choice>, since <app> contains either alternates (<lem>, <rdg>s, and <rdgGrp>s) or notes (<note>, <wit>, <witDetail>). It shouldn’t directly contain a <gap>, for example. That’s actually more than a little nuts.
2) Add a model.appLike (or similar) and allow it almost anywhere.
I’d prefer #1, because it fixes what I see as a bug. This would invalidate content like <app><lem>foo</lem><gap/><rdg>bar></rdg></app>, but I would argue very strongly that this should never have been allowed in the first place, and I can’t see how it would make any sense. I’d be astonished if anyone was actually doing this in the wild.
I also think this should have showed up way earlier, and the reason it didn’t is that the Stylesheets tests are pegged by default to the current release, so Jenkins is not checking them against the contents of the master branch. I do see the value of having them test against the current release in terms of pure Stylesheets development, but it’s a serious flaw for any work that should happen in tandem. I’d like to suggest that we add a second build of the Stylesheets in Jenkins that runs its tests against the last build of TEIP5. That would a) alert us immediately if tests need to be regenerated, and b) flag things like this Odd By Example bug early on.
Thoughts? I can implement either fix fairly quickly. And then do a 2.9.1 release.
Hugh