OP-TED / eforms-notice-viewer

This is a sample eForms application that can visualise an eForms notice. It uses efx-toolkit-java to generate XSL templates from notice view templates written in EFX. It then uses an XSLT processor to generate an HTML visualisation of any given eForms notice.
https://docs.ted.europa.eu/eforms-common/notice-viewer/index.html
European Union Public License 1.2
10 stars 2 forks source link

Release/0.8.0 #69

Closed rousso closed 1 year ago

rousso commented 1 year ago

Review and merge this one to main. After releasing EXT 1.3.0 we will also release ENV 0.8.0.

bertrand-lorentz commented 1 year ago

If I run the application to convert an XML notice, I get the following error:

12:15:28.970 [main] DEBUG e.e.t.e.v.generator.HtmlGenerator - Applying XSL transformation for language [en] and view ID [CEI]
12:15:29.126 [main] ERROR e.e.ted.eforms.viewer.Application - Error executing the application with arguments [[en, ../../eforms-sdk/examples/notices/CEI.xml]]. Please see the logs.
12:15:29.128 [main] DEBUG e.e.ted.eforms.viewer.Application - Exception thrown:
net.sf.saxon.trans.XPathException: URIs using protocol file are not permitted
    at net.sf.saxon.lib.DirectResourceResolver.resolve(DirectResourceResolver.java:59)
    at net.sf.saxon.lib.ResourceRequest.resolve(ResourceRequest.java:123)
    at net.sf.saxon.functions.DocumentFn.resolveURI(DocumentFn.java:418)
. . .
    at eu.europa.ted.eforms.viewer.generator.HtmlGenerator.applyXslTransformation(HtmlGenerator.java:212)
    at eu.europa.ted.eforms.viewer.generator.HtmlGenerator.generateFile(HtmlGenerator.java:109)
    at eu.europa.ted.eforms.viewer.NoticeViewer.generateHtmlFile(NoticeViewer.java:123)
    at eu.europa.ted.eforms.viewer.NoticeViewer.generateHtmlFile(NoticeViewer.java:95)
    at eu.europa.ted.eforms.viewer.cli.CliCommand.call(CliCommand.java:112)
    at eu.europa.ted.eforms.viewer.cli.CliCommand.call(CliCommand.java:36)
. . .

Unit tests run OK.

It seems that our custom URIResolver (TranslationUriResolver) is not used anymore when running the app from the command line. I was not able to figure out how to use it without possibly impacting usage of the viewer as a library.

bertrand-lorentz commented 1 year ago

I added a commit to solve the problem noted above: running from the command line now also uses TranslationUriResolver.

This looks OK, but we should wait until eforms-toolkit-java is released before merging this and releasing.