-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
regression in 0.7.6: @imageFilename relpath is resolved incorrectly #355
Comments
Wow, something superfishy is going on here. If I rewrite my PAGE files to appease LAREX, removing the
So despite the fact that now |
I'm not sure this ever worked in LAREX with the data provided above as the logic for retrieving image paths from the LAREX/src/main/java/de/uniwue/web/controller/ViewerController.java Lines 126 to 137 in ce926a6
and not relative to the PAGE XML file location (as you already noted in the second comment). I didn't change any of that in my recent commits and if I'm not missing something this has worked this way for the METS mode since a while (if not ever). I think I sent @chaddy314 (please chime in if wrong) the data from the OCR-D/assets repo back then when he implemented it, where that behaviour (Page When removing the Screen.Recording.2024-12-13.at.11.20.48.movI guess you replaced the I can also reproduce this for the alternative images as a whole in the data you provided, as they're noted in a "weird" way anyways, e. g. as The most robust way moving forward would probably be to use the paths from the METS file as the paths in there should always be relative to the METS root (?). |
Thanks for your fast and thorough response @maxnth! Sorry, I got confused about LAREX' expectations and did not remember this correctly. Indeed, this is not a regression at all, not even something (the old version of) LAREX can do much about. Yes, you are absolutely right the problem is that the prefix is not even consistent. So when my LAREX still did not load/show anything after removing I could fix this in the data by a smarter shell script. Will provide that as a PR for the GT repo. Yes, I dimly remember now that we agreed on the OCR-D convention of having the same path in the PAGE as in the METS. |
IIRC this was already in a usable state before the recent changes: LAREX needs to resolve the relative path of
@imageFilename
in a PAGE-XML. It must be clear to the user how to provide for that.I now get errors like this:
That happens when loading a PAGE fileGrp from the METS here.
So obviously, LAREX concatenated the
@imageFilename="../jpg/abel_leibmedicus_1699_0007.jpg"
with the path of the METS root instead of the directory of the PAGE-XML file itself.I cannot think of a reasonable scenario where that would make sense.
Either you resolve via METS completely – then you have to look up the image mets:file via physical structmap – or you resolve it via PAGE – prefixing
@imageFilename
path with the PAGE directory.So this seems to be a regression of the recent changes integrated by @maxnth – can you please take a look?
The text was updated successfully, but these errors were encountered: