The code that adds <span class="gap"> around <gap/> elements also seems to break the regex that removes redundant square brackets between adjacent <supplied> and <gap> instances. See for example the second example under http://www.stoa.org/epidoc/gl/latest/trans-restoredincomplete.html.
I think we need to either (a) go in and fix the regex so that it knows to look to either side of opening or closing <span> tags when stripping out square brackets, or (b) parametrise the addition of <span> so that it only affects the DCLP (or whichever project it was introduced it). Preferably both, I suppose, so that the project in question continues to have correct square bracket handling as well, but at the very least (b).
Will attempt to do (a)
This really needs to be fixed. At the bare minimum, the addition of
<span>needs to be parametrized so that it does not break anyone else's use of EpiDoc XSLT. Another option is to roll back the change altogether, and let DCLP/PN make the customization locally in their project. Can we have a firm proposal for fixing this as soon as possible, please?I have increased the priority on this ticket to "9 (high)".
Diff:
EDAG agreed a couple months ago that since this is a bug introduced by a change to the Reference XSLT that did not follow good practice for EpiDoc editing (i.e. parametrising project-specific changes so they do not cause regression or failure for templates used by others), unless it can be fixed imminently, we should revert the change that caused the bug, and ask the originating project to re-introduce it with care (using parameters and testing against regression using the Testing Suite) if they still need this.
Unless this can be fixed for release 9.1, I propose to take ownership of this ticket and delete the code that caused the bug.
There's no bug in the Stylesheets, and no issue that I can see with the use of span around gap. Which is not a DCLP thing, it's an RTL language thing, which I don't see as being a project-specific issue. You may disagree, but I'll argue with you. As far as I can see, what's happening is the Guidelines example transform simply doesn't call the square-brackets-removal template. I think this baffled me last summer, so I tabled it, and then forgot about it, for which my apologies. It baffled me, because when I created a test file with a supplied alongside a gap, it just worked!
So kudos for irritating me enough to dig a bit deeper this time. I'll check in a fix to the Guidelines XSLT which should deal with it. If there are other examples where it doesn't work, please surface them for me.
I think I fixed this in r2727. Can someone check?