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

rdgs not showing for Witness D #29

Closed haggis78 closed 4 years ago

haggis78 commented 4 years ago

@ebeshero For some reason, the red text (variant readings) isn't showing up in the html for part of Witness D. If you go to the Comparison page and select D and any other witness, then scroll down to the bottom, you'll see what I mean. I checked the xml and don't see anything anomalous there. What could be causing such an outcome?

ebeshero commented 4 years ago

@haggis78 My guess would be there's something missing in the CSS for that witness, but I say that before looking at the actual code...

haggis78 commented 4 years ago

@ebeshero What's odd is that the first 2/3 of D looks fine; this only affects the final part.

ebeshero commented 4 years ago

@haggis78 I was just about to post that I didn't see the problem, but I was only looking at the top of the page. So now that I scroll down, with witness D on the left, and witness O next to it, I see:

Screenshot 2019-12-11 21 28 39
ebeshero commented 4 years ago

@haggis78 There's the problem, right? Let's see if there's any code there. I wonder if this was last run through XSLT at a moment before D was finished?

haggis78 commented 4 years ago

@ebeshero Yes, that's exactly what I was looking at. I couldn't say when it was last run through XSLT.

ebeshero commented 4 years ago

@haggis78 I inspected those last two elements on witness D using the element inspector tool on my web browser (that made it even possible to isolate those particular p elements inside witness D only: I couldn't have just seen them by opening the HTML without a LOT of hunting). So what I see are two HTML <p> elements that lack any <span class="variances"> elements inside.

haggis78 commented 4 years ago

@ebeshero That is, I know I was running it through my XSLT for the calculation stuff, but not the XSLT for the comparisons page.

ebeshero commented 4 years ago

@haggis78 I would next check your TEI XML to see if witness D is represented for those last two blocks of text.

ebeshero commented 4 years ago

And if it is, go run the XSLT so they'll output, and post the new HTML forthwith to the website.

haggis78 commented 4 years ago

@ebeshero Witness D definitely shows up there in the XML, so I'll try that.

haggis78 commented 4 years ago

@ebeshero OK, I ran it through the Comparison XSLT and saved the HTML, but when I opened the HTML from my computer (without having pushed it etc.), it comes up as a blank page with nothing but the background color. Should I be concerned?

ebeshero commented 4 years ago

@haggis78 ....yes? be concerned. Do you have code coming out? Check that you've actually selected the correct files to process in the XSLT windows...

haggis78 commented 4 years ago

@ebeshero Confirmed correct files. When I right-click the blank page and say view page source, it looks just like the page source for the actual website from the server, except with additional stuff at the top that I think is the SSI. So the code is there. But the page itself looks blank.

ebeshero commented 4 years ago

Do you see text boxes to pull up the files you need, or are you missing those...Oh wait minute...!

ebeshero commented 4 years ago

You have an SSI, don't you?

amberpeddicord commented 4 years ago

@haggis78 I think the problem there might just be because the actual comparison navbar is an SSI! So it won't be visible locally.

haggis78 commented 4 years ago

Yes, it's in a different folder. So all is probably fine?

amberpeddicord commented 4 years ago

@haggis78 If the files are pushed to the repo, I can do a git pull and update the server! But, I have made some pushes recently, so I'd do a git pull first.

ebeshero commented 4 years ago

That's actually kind of a development problem, isn't it? We might not, in practice, really want to have an SSI to contain the checkboxes for comparing these witnesses, because you want to be able to test the views of your files locally before putting them on the server. For the long term of this project and your own peace of mind, I'd actually recommend removing this particular SSI on the comparison pages, just so you can see what you're doing before you post.

ebeshero commented 4 years ago

And by "remove this particular SSI," I mean, of course, replace it with the actual code you need to display locally. It's not really a big deal to just paste it into the XSLT in the appropriate place.

haggis78 commented 4 years ago

@amberpeddicord Github says already up to date when I tried to pull, so I should be in the clear to push...

haggis78 commented 4 years ago

@amberpeddicord pushed.

amberpeddicord commented 4 years ago

@haggis78 The server is updated!

haggis78 commented 4 years ago

@ebeshero @amberpeddicord Annnd... nothing. same as before.

ebeshero commented 4 years ago

@haggis78 Uh oh. I suspect something's not right in the source TEI in those last two blocks because it's not pulling data about witness D...

haggis78 commented 4 years ago

@ebeshero You mean in the main XML file?

ebeshero commented 4 years ago

@haggis78 Yes--in the source TEI XML file. Can you find something in the source XML at that moment in the TEI that should be producing a span in witness D's output? Let's take a look at that code.

ebeshero commented 4 years ago

@haggis78 Also, take a look at the comparison data in @alnopa9 's SVG plots about witness D in the last two blocks of the document: It seems as if that XSLT most likely wouldn't be pulling data either.

haggis78 commented 4 years ago

@ebeshero I can tell you it's pulling data for the XSLT I wrote to do the numerical comparisons. Or at least I think so. It's giving the same count of rdg s that contain #D as of every other wit.

ebeshero commented 4 years ago

@haggis78 I wonder if it's something silly like someone leaving out a '#'...only we'd expect your schema to catch that...Let's see some TEI code.

haggis78 commented 4 years ago

<app>
               <rdg wit="#W #S #R #J">educatione</rdg>
               <rdg wit="#I #C #O #D">eruditione</rdg>
            </app> prædictorum adolescentium capiendo vel clamando.
         </ab>

                 <ab><app>
               <rdg wit="#W #S #I #J #C #O #D">Ac etiam</rdg>
               <rdg wit="#R">Acetiam</rdg>
            </app> de gratia nostra speciali<pb ed="#C" n="262"/> certa scientia<app>
               <rdg wit="#W #S #I #R"/>
               <rdg wit="#J #C #O #D"> et</rdg>
            </app>
'''
ebeshero commented 4 years ago

Also, I just pushed up the JS Timeline stuff in a state of in medias res (unfinished but improving)... so everybody git pull.

haggis78 commented 4 years ago

@ebeshero that's the last app before the change and the first two apps after. I don't see anything out of the ordinary.

ebeshero commented 4 years ago

Hmmm. I don't see anything amiss there either, but something's not right. Maybe we'd better compare the XSLT we're using to process this vs. Alyssa's output SVG files... I wonder why it's skipping D in processing just the last two <ab> elements?

ebeshero commented 4 years ago

@haggis78 Here's an idea. Let's set up a dummy source TEI file that only contains the last two <ab> elements. That is, delete everything else in the <body> of the document except those two elements as if they were the entire source TEI you need to process. And run the XSLT and look for witness D... I'm trying to see if we can isolate the problem.

ebeshero commented 4 years ago

I don't mean really delete everything, of course. But make a new tester copy of the TEI file with JUST those two <ab> elements in <text> and whatever container elements you're using, and see if we can get them to process.

haggis78 commented 4 years ago

@ebeshero OK, tried that. I tried to save the html to my desktop so I wouldn't mess up the repo and for some reason it refuses? But I can see the output column in oXygen, and the section for D doesn't look any different than the other sections. The span class="variances" elements show up in the same places, with text inside them -- but that's the text that won't actually show up on the webpage. It's here in the output html all right.

ebeshero commented 4 years ago

@haggis78 Okay. Now, when you run that same code over the complete TEI file, though, you don't see those <span class="variances"> elements in the XSLT output window, right? (Or do you see them?)

haggis78 commented 4 years ago

@ebeshero Well, when I Inspect Page Source on the html that's been generated in exactly that way, I do NOT see those elements, beginning in exactly that place. Huh.

ebeshero commented 4 years ago

There will be some reason it's not processing, but if you run it over the complete TEI file and don't see those <span> elements, we can be sure it's something in the XSLT that's amiss.

ebeshero commented 4 years ago

@haggis78 Having just debugged the SVG / HTML / JS / CSS problem with the Timeline, I'd be happy to take a look at this in more detail after a break. But I wonder if we can figure out why witness D isn't processing. We can also call in @alnopa9 for backup...

haggis78 commented 4 years ago

@ebeshero But wait -- processing it anew, everything shows up as it ought in the Output window. Yet when I then try to save that output html to the folder, a) the folder still says the file was last updated Monday morning (the 9th), and b) when I open it as html, and inspect the source, those bits are missing again. And Amber had run it earlier this evening, correct? And then updated the server an hour ago. So somehow it seems as if it's not saving when we tell it to.

haggis78 commented 4 years ago

@ebeshero I'm about to turn into a pumpkin. I'll see if the morning brings any clarity. Thank you for your help!

ebeshero commented 4 years ago

@haggis78 I'm not sure what's going on, but maybe I should try running it here and see what's happening...

ebeshero commented 4 years ago

@haggis78 ...okay I ran the XSLT on my computer and I'm remembering @alnopa9 working on this. The XSLT is set up to with an <xsl:result-document> that's saving over comparison.html in your GitHub repo. I think it's producing exactly the same output that's already there, which is why your computer is registering no change. (Mine doesn't register any change either). I'm seeing some problems in this output that are worrying me...

ebeshero commented 4 years ago

@haggis78 @amberpeddicord I spent some time comparing output on the GitHub repo vs. what's up on the web server, and the files were different for reasons I don't understand. But I also saw that what was on the GitHub repo featured some old errors that I remember @alnopa9 and I correcting, so I corrected those myself, and in the process I got good, complete output of witness D. I suspect there might have been a moment when commits crossed with an update to the XSLT getting lost on one side, and an update to the TEI on the other, but I think I've managed to resolve it now!

I've pushed repairs to the XSLT and to its output comparison.html up to the repo. In checking the output, I went ahead and just pasted in the SSI file (comparison-page-ssi.html) to make sure everything is as it should be, and I left it that way so you can look at it, too: I added a special htmlpreview feature for GitHub onto this link so you can see the output in a browser:

http://htmlpreview.github.io/?https://github.com/haggis78/BreconChurch/blob/master/site/html/comparison.html

Click on Witness D and scroll down and take a look...I think it's all intact here.

ebeshero commented 4 years ago

@haggis78 @amberpeddicord If that looks right to you, you should replace the comparison.html file on the web server with this one.

alnopa9 commented 4 years ago

I didn't read this whole thread, but Witness D just needed updated because I hadn't run the XSLT that outputs the whole page since the markup for D had been completed. As for why the page comes up blank, it's because the nav bar is an SSI, so you'll have to add the code manually to view it locally. All of the text on the comparison page is set to display: none. You only view the text once you click one of the check boxes, which then fires the javascript and switches the display: none to be off.

ebeshero commented 4 years ago

@alnopa9 We have all of witness D up now, having re-run the XSLT. And it appears to be up on the website, too.