nlbdev / pipeline

NLB branch of the super-project that aggregates all Pipeline related code. See https://github.com/daisy/pipeline for the main branch.
http://repo.nlb.no/pipeline
3 stars 1 forks source link

Processing terminated by xsl:message at line 2137 in css-to-obfl.xsl #203

Open josteinaj opened 6 years ago

josteinaj commented 6 years ago

This started happening between 3ea2d35 and b8a23ea. Those two commits have been built and are available under http://repo.nlb.no/pipeline/ using the updater, but not the intermediate commits. I haven't tried building the commits between them yet to determine which commit caused the issue.

The bug does not occur in all books, but it does happen with the book we use for system testing in our production system (which I can provide upon request). I have not yet tried to determine whether there is some specific part of the book that causes this issue.

I don't see an easy way to create a regression test for this issue. I can get the input for css-to-obfl.xsl which causes the error, but css-to-obfl.xsl depends on some Java stuff. The NLB translator is used, which is not available from the xprocspec tests in dotify-formatter. I don't think there's an easy way to import for instance css-to-obfl.xpl for use in a xprocspec test in mod-nlb either.

The tests in dotify-formatter has been disabled (presumably by mistake) since 039bbe2872b as a result of adding a focus attribute to one of the tests. Three of the tests in test_format.xprocspec fail if that focus attribute is removed:

bertfrees commented 5 years ago

After the last pull from pipeline-mod-braille there is no focus attribute anymore. Not sure I ran the dotify-formatter tests but I think I did. Regarding the "processing terminated" error, is that related? If not, I'm gonna need that test book.

josteinaj commented 5 years ago

115437.html.txt

This is the input file. The contents are obfuscated (same as in our automated tests).

This is the input book for our tests, but by the time it reaches the braille script it looks like the HTML above: https://github.com/nlbdev/produksjonssystem/raw/dab0d8ac7f12e44b7d4849116b8242f2d9b19585/tests/558237.epub

josteinaj commented 5 years ago

I discovered that the dotify-formatter tests had the focus attribute while trying to find the source of the error, but I don't think it's related.

bertfrees commented 5 years ago

I can't reproduce the error so I assume it has been fixed in the mean time. I did hit another issue though. When a th element contains a noteref, like in this book, it can result in notes being repeated, because the th may be repeated. The same is true when there are two different noterefs referencing the same note. In the past this didn't cause an error, there would just be an duplicated note at the bottom of the page or end of book. However after my latest changes this will cause an error in Dotify. Not sure yet how I should best fix that...

josteinaj commented 5 years ago

I haven't managed to test in on the latest version as I'm having trouble building the repo. (make RUBY=ruby dist-zip-minimal ends up in a .make/main.mk:254: recipe for target '.group-eval' failed) I'll try reproducing this issue again when I have things built.

josteinaj commented 5 years ago

I can build the linux distribution (but not the zip) locally. Had to fix the cli to be able to parse the version string for openjdk 10. Now I'm getting parse-content.xsl:23:: net.sf.saxon.trans.XPathException: A sequence of more than one item is not allowed as the value of variable $context (<a/>, <a/>). I'm not able to build the system with the Dockerfile currently, so I can't reproduce it with Docker yet.

bertfrees commented 5 years ago

The exception is because of the issue with noterefs inside tables that I mentioned above.

What do you mean by "I can build the linux distribution but not the zip"?

josteinaj commented 5 years ago

Oh, I must've had my head in two places when I wrote that. I meant I can build the linux distribution but not the minimal distribution.

(in the Dockerfile I can't build the linux distribution either)

josteinaj commented 5 years ago

I think the problem in the Dockerfile is that the .git folder is not availble:

[ERROR] Failed to execute goal ch.sbs:project-version-maven-plugin:1.0.0-SNAPSHOT:set-detailed-project-version (default) on project mod-nlb: Error computing detailed version: RuntimeException -> [Help 1]
bertfrees commented 5 years ago

Hmm, annoying. It seems that Christian does not ignore the .git folder when he builds his Docker image, but that's maybe not such a nice solution either.

josteinaj commented 5 years ago

On a build server, the .git folder might not be too big. I think Jenkins normally does a shallow(?) clone.

bertfrees commented 5 years ago

But will the git describe command work correctly with a shallow clone?

josteinaj commented 5 years ago

Don't know.

bertfrees commented 5 years ago

I can run your test book without errors now.