Skip to content
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

EFES not working on some servers / with some OS/Java versions #57

Open
IreneVagionakis opened this issue Oct 31, 2020 · 14 comments
Open
Assignees
Labels
Milestone

Comments

@IreneVagionakis
Copy link
Member

The EDF:f-wwrap function (defined in webapps/ROOT/kiln/stylesheets/epidoc/teig.xsl and called by webapps/ROOT/kiln/stylesheets/epidoc/teisupplied.xsl, webapps/ROOT/kiln/stylesheets/epidoc/teig.xsl and webapps/ROOT/kiln/stylesheets/epidoc/teispace.xsl; see also webapps/ROOT/kiln/stylesheets/epidoc/htm-teilb.xsl) does not seem to work properly on some host servers.

@IreneVagionakis IreneVagionakis added this to the Future Work milestone Oct 31, 2020
@ajenhl
Copy link

ajenhl commented Oct 31, 2020

Please provide details on how it is failing to work properly, and what the differences are between a host server where it is working properly and one where it is not.

@IreneVagionakis
Copy link
Member Author

I attach the screenshots / .txt files with the error message that appears when trying to open some inscription pages from the inscriptions list, and I attach also a .txt file with the configuration of the two servers.

screenshot_location
screenshot_cocoon_stacktrace
stacktrace.txt
full_stacktrace.txt
server_configuration.txt

@ajenhl
Copy link

ajenhl commented Nov 4, 2020

Thanks for the details. I've run into this problem sporadically myself, but have never managed to determine why it occurs only sporadically, nor why it occurs at all since the function is defined and imported. Can you please look at the introspection data showing the full XSLT being used to render a page exhibiting the problem and either attach it here or confirm that the EDF:f-wwrap function is present and in the correct namespace.

@IreneVagionakis
Copy link
Member Author

IreneVagionakis commented Nov 4, 2020

Through the admin/introspection I see only this:
Introspection
Anyway, the problem seems to occur only in the pages where the EDF:f-wwrap function should be in action, that is when there is a <lb break="no"/> immediately preceded by a <supplied>, a <space> or a <g>.

The error message Cannot find a 1-argument function named {http://epidoc.sourceforge.net/ns/functions}f-wwrap() is shown also in Oxygen in teispace.xsl ca. line 14 and in teisupplied.xsl ca. line 87, but not in teig.xsl ca. line 25, apparently because the function has been defined in the file itself at ca. line 9. So, I have tried now to copy the function declaration from teig.xsl also into teispace.xsl and teisupplied.xsl and the error message disappears (both in Oxygen and in the inscription page on the browser) and the function seems to work (at least on one of the servers on which it was not working before): could this be a correct solution?

@ajenhl
Copy link

ajenhl commented Nov 4, 2020 via email

@IreneVagionakis
Copy link
Member Author

Thank you! With .../admin/introspection/template/epidoc-edition_name.xsl the problem seems to be in teig.xsl:
Introspection
By viewing the page source view-source:http://.../admin/introspection/template/epidoc-edition_name.xsl, the error appears to be in <xsl:import href="teig.xsl">, and in particular with the denarius, drachma, sestertius/sestercius and century symbols. After commenting out their specific xsl:when conditions, the .../admin/introspection/template/epidoc-edition_name.xsl returns no errors, nor the server returns the EDF:f-wwrap error (even removing the unnecessary duplicate function declaration that I had added previously).

So, apparently, the EDF:f-wwrap function couldn't be found because there was an error in importing the teig.xsl file where that function was declared, and this error was caused by the hexadecimal codes of the following symbols:

  • sestertius/sestercius: &#x10198;
  • denarius: &#x10196;
  • drachma: &#x10175;
  • century: &#x1019B; (??)

I have tried to replace them with their equivalent decimal codes (&#65944; &#65942; &#65909; ??), but nothing changes.

@ajenhl
Copy link

ajenhl commented Nov 4, 2020

Interesting! Those characters have been part of Unicode for many years now (including Unicode 6.2, which is supported in Java 8 (1.8)), so I'm a little surprised that some systems may not recognise them.

@gabrielbodard
Copy link

It strikes me that these four characters are all Unicode Plane 2, which means they can't be represented in UTF-8, which may be somehow contributing to the problem? I suspect that there isn't a probably with passing these values as text, but perhaps with parsing them in the XSLT itself. If that's the case then I suggest a sequential solution to the EFES problem as follows:

  1. comment out the 4 plane-2 unicode symbols from the EFES branch of Stylesheets
  2. merge the glyph-branch into EpiDoc Stylesheets – which should have the effect of removing the Unicode from the XSLT altogether and moving it into content XML and authority lists
  3. fix the relationship between Stylesheets and EFES, so that we inherit the EpiDoc Stylesheet fix at next release (or, extraordinarily, before then)

@ajenhl
Copy link

ajenhl commented Nov 18, 2020

Those characters can be represented in UTF-8 (all of Unicode can be), but that doesn't alter that for whatever reason some systems are not recognising them.

Merging the glyph-branch should mean that the problem doesn't occur as often, and should make it more apparent what's going on when it does occur, which seems like a decent improvement over the current state of affairs.

As for the matter of syncing EFES Epidoc-XSLT with the origin, can updating the EFES repository be rolled into the release procedure of the Stylesheets as a copy&paste step? I'm not sure that the elsewhere proposed Git integration isn't more complex than it's worth (but I may equally be entirely wrong about that).

@gabrielbodard
Copy link

gabrielbodard commented Jul 21, 2021

An aside: it occurred to me also that the wwrap() function seems to be in the wrong place; I would expect to find it either in teilb.xsl or, better, functions.xsl, where it can be called from teig, teisupplied, teispace, etc. If we put it somewhere more rational, would that accidentally fix the currently problem of it being (apparently) broken by the Plane 2 Unicode in teig.xsl?

@gabrielbodard
Copy link

I have moved EDF:f-wwrap from teig.xsl over to functions.xsl, as suggested, and it does indeed make this problem go away for square brackets in EFES. (Commit 64dcac4.) I suspect the problem will recur whenever anyone is using the g-london, g-rib or g-creta glyph templates, however, since any one of those three was what seemed to break the stylesheets previously.

Since happily this is not impacting on g-ddbdp, the biggest legacy project that still uses the latest stylesheets in deployment, how quickly do we think we can deprecate the use of <g type="abc"> altogether in the other three projects? Official EpiDoc recommendation is now to use <g ref="#abc"> and a glyph-list instead.

@Tamarae
Copy link

Tamarae commented Jul 21, 2021 via email

@gabrielbodard
Copy link

Good night, everyone I was excited to try this, I copied the changes in my EFES files, and created functions.xsl file in the same directory, but I still get this error:

@Tamarae did you also add an include of functions.xsl in start-edition.xsl? (Or better, merge the Stylesheets into your copy of EFES, rather than trying to replicate the changes, since it sounds like you're missing some other recent updates to the Stylesheets now…?)

@gabrielbodard
Copy link

gabrielbodard commented Sep 24, 2021

Further testing suggests that this is not an XSLT or XSLT processor error at all, but that something in the EFES pipeline will choke on a plane-2 Unicode character (codepoint > U+FFFF) in XML even without any XSLT transformation at all.

What are the candidates? One of the Cocoon components? Java?

@IreneVagionakis IreneVagionakis changed the title EDF:f-wwrap function causing issues on some servers EFES not working on some servers / with some OS/Java versions Jun 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants