haggis78 / BreconChurch

Files for our DH project on Henry VIII's Letter Patent founding Brecon Collegiate Church in Wales.
3 stars 0 forks source link

Why do we sometimes see nested `<app>` elements? #16

Closed ebeshero closed 4 years ago

ebeshero commented 4 years ago

@alnopa9 and I were taking a look at the project code and noticing that sometimes there are <app> elements nested inside <rdg> elements. @alnopa9 has the file open and will post an example following this message. We are confused about what this means, and whether it's intentional or an error that needs to be corrected. Can anyone explain this phenomenon to us? @haggis78 @amberpeddicord @ChinoyIndustries

alnopa9 commented 4 years ago
<app>
    <rdg wit="#I #C #O">
        Henricus Octavus Dei gratia, Angliae et Francia Rex fidei Defensor Dominus Hiberniae Et in terra 
            <app>
                <rdg wit="#W #S #R #I #O">Supremu</rdg>
                <rdg wit="#C">Supremum</rdg>
            </app>
            <app>
                <rdg wit="#W #R #S #I #O">Eccliae</rdg>
                <rdg wit="#C">Ecclesiae</rdg>
            </app>
        Anglicanae
    </rdg>
    <rdg wit="#W #S #R #J"/>
</app>
amberpeddicord commented 4 years ago

@ebeshero @alnopa9 That's because the entire opening from "Henricus" to "Anglicanae" is something that isn't in all of the manuscripts, but in the manuscripts where it occurs there are sometimes variations in spelling! So, the entire opening is one app, and the variations in spelling within it is another. I hope I explained that well enough!

ebeshero commented 4 years ago

@amberpeddicord Hmmm. I'm maybe not following something about how the witnesses work. In this passage, the outer <app> is holding a first "wrapper" <rdg> element pointing to witnesses I, C, and O. What I'm not understanding is how an inner <app> could sit inside that wrapper <rdg> and be pointing to completely different witnesses, W, S, and R?

The second "wrapper" app makes it look like W, S, and R (as well as J) are simply missing all this content from "Henricus" to "Anglicanae"--so this is why we are confused!

If you're going to nest something like this, the outer rdg that's wrapping around the whole should be indicating something common to a shared group of witnesses. We're confused because we're seeing witnesses that aren't in the outer "wrapper" rdg showing up inside the inner one!

I think we can find a better way to encode this so it's a little easier to understand and process, but maybe we should meet and talk over this code for a few minutes--there may be something I'm not understanding here!

amberpeddicord commented 4 years ago

@ebeshero Oh, I see! You're right, I think I mistakenly coded W, S, and R inside the opening. When I was coding manuscripts, if there was a new change that hadn't been coded, I automatically coded every other witness as having what was already there. But in this case, only "I" and "O" should be in the reading witnesses for 'Supremu' and 'Eccliae'!

ebeshero commented 4 years ago

@amberpeddicord Glad we figured it out...We should do some XPath and check out the other apps that have descendant app elements inside, and make sure there's a good reason for it. I'd recommend finding a different way to encode these though. (@alnopa9 noticed this--thank you!--while she was tinkering with XSLT over your code, and I think she said it was only coming up a handful of times.)

haggis78 commented 4 years ago

There's a straightforward solution for the nested apps problem. The section just needs to be broken up into pieces, and then the witnesses that lack that whole section of text need to be entered as lacking each individual piece. @amberpeddicord @ebeshero @alnopa9