open-editions / corpus-joyce-portrait-TEI

The Open Scholarly Edition of James Joyce's A Portrait of the Artist as a Young Man
GNU General Public License v3.0
20 stars 20 forks source link

Remove chapter prefixes from line numbers #77

Closed pletcher closed 6 years ago

pletcher commented 6 years ago

Fixes #73

pletcher commented 6 years ago

Hmmm, not sure why the deploy/netfily check is failing. Any tips on what I should look into?

JonathanReeve commented 6 years ago

@pletcher, don't worry, I think the edition wasn't validating, anyway. I'll open an issue for fixing that. Thanks for the PR! Will review this soon.

JonathanReeve commented 6 years ago

So it looks like you removed the chapter prefixes from the actual line numbers, but the issue is actually labeled XSLT, so the goal was to remove the chapter prefixes from the transformed HTML, by changing the XSL file, not the original XML source. It's my mistake--I should've been more explicit about this in the issue.

Basically the fix for #73 would be a line or two of XSL code that would automatically transform line numbers like 10005 in the XML source to 5 in the HTML, and 52267 to 2267. I think we'll keep the source line numbers the same, in case we need to be backwards-compatible with Gabler's edition. Also, this PR appears to have a lot of merge conflicts, so I couldn't merge this if I wanted to, without lots of manual fixing.

But thanks for this, anyway! And if you want to take a crack at the XSL, go for it!

pletcher commented 6 years ago

Ah, my bad — fixing the XSL makes a lot more sense, I should have realized that.

No sweat, though — this was just a short script to change these numbers; I think the same principle can be applied in the XSL.

(For future reference, the merge conflicts likely resulted from more recent updates to portrait.xml. Were this PR mergeable — admittedly, it is not — the fix would mostly consist of rebasing the repo locally and rerunning the aforementioned script — no need for a lot of manual tweaking. :) )