ebeshero / Amadis-in-Translation

a project to apply TEI markup to investigate early modern Spanish editions of Amadis de Gaula and their translations into English and French from the 1500s to the early nineteenth century.
http://amadis.newtfire.org
GNU Affero General Public License v3.0
4 stars 6 forks source link

Tweak Schematron, mostly switching to deliberate use of atomic vs. se… #40

Closed sydb closed 9 years ago

sydb commented 9 years ago

…quence comparitors

@ebeshero , @setriplette , @HelenaSabel : I've used the “standard” gitHub method of creating a new branch and submitting a pull request. This gives at least one of you a chance to take a look at what I’ve changed before you agree to it. I don’t know for sure (I’m pretty new to gitHub), but I believe it’s an all-or-nothing thing. You either accept all my changes or reject them. Of course, you can reject them wholesale, and then copy-and-paste the ones you like.

That’s the good news. The bad news is that I changed the whitespace used in the document and forgot to change it back before I committed. So when you ask gitHub to compare the two files it shows almost every line as different. You may want to actually checkout a copy of my branch and use oXygen’s Tools > Compare Files feature, telling it to ignore whitespace.

In which case there are 28 or 29 differences, the vast majority of which are changing things like @type='crazy' to @type eq 'crazy', as the former compares two sequences, the latter two singleton values. In the case of comparing two sequences of 1 item each you get the exact same results, of course. But it is clearer, and for some processors might be more efficient. But far more importantly, it draws attention to what you are doing when you actually use =, e.g. I’ve changed .[@ana='start'] | .[@ana='end'] | .[@ana= 'intStart'] | .[@ana='intEnd'] to just @ana = ('start','end','intStart','intEnd'), which is much more readable, much less error-prone, and probably a bit more efficient with some processors.

ebeshero commented 9 years ago

@sydb @HelenaSabel @setriplette Syd: Thanks for the very thorough review and simplification of our Schematron code, and explaining the difference between "eq" and "=", which I don't think I've ever properly understood. I want to respond to one of your comments in the file by opening a new issue: It's about our misuse of the @type attribute on <milestone/> which I hadn't properly realized was problematic until you brought it to our attention here!