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

Need to add FOP/PDF build/test to P5 Tests #1559

Closed
martindholmes opened this issue Dec 23, 2016 · 7 comments
Closed

Need to add FOP/PDF build/test to P5 Tests #1559

martindholmes opened this issue Dec 23, 2016 · 7 comments

Comments

@martindholmes
Copy link
Contributor

martindholmes commented Dec 23, 2016

We've been bitten by bugs in transformation of ODD to PDF in TEIC/oxygen-tei#15, and it's mainly because none of our tests currently do much with FO/PDF transformation.

We should:

  1. Add the FOP 2.1 jar and its dependencies to the P5/Utilities/lib/ folder. This will involve either a) checking for conflicts between the jars FOP needs and the jars that we already have, and resolving version issues, or b) putting all the FOP stuff together in a separate folder. b) is simpler, but a) is more sensible.

  2. Adding to P5 Tests a conversion from one of our test ODDs to PDF using FOP. This will break the build initially, because it will fail due to multiple bugs such as the one linked above.

  3. After fixing the test so we can build, adding a couple more tests to be sure.

@martindholmes
Copy link
Contributor Author

This shows how to call FOP from ant:

https://xmlgraphics.apache.org/fop/2.1/anttask.html

so something like this would be added to P5/Test/antruntest.xml.

martindholmes added a commit that referenced this issue Dec 24, 2016
…ts to the antruntest.xml file, but haven't yet set up a specific test to run.
@martindholmes
Copy link
Contributor Author

In commits c74f538 and 5b589a9 I've added a minimal FOP setup to the repo, and put a taskdef and a couple of needed targets into the antruntest.xml file. I haven't yet set up a specific test or tried one yet.

@martindholmes
Copy link
Contributor Author

In commit ef53914 I've added a shell script, P5/Test/testfo.sh, which calls the ODD to PDF conversion stuff on the testbasic.odd ODD file and triggers the errors that need to be addressed in the Stylesheets, starting with this one:

/tei/TEI/P5/Test/antruntest.xml:266: Fatal error during transformation using /home/mholmes/DiskStation/tei/Stylesheets/profiles/default/fo/to.xsl: Effective boolean value is not defined for a sequence of two or more items starting with a boolean; SystemID: file:/tei/Stylesheets/fo/fo_figures.xsl; Line#: 336; Column#: 23

These issues now probably need to be raised and dealt with one by one in the Stylesheets repo, so I'll raise that first one. When all Stylesheets issues are dealt with and the transformations work OK, work can move back into this ticket, so we can decide how/whether to integrate FO testing into the TEI build process. I notice that although antruntest.xml includes code for testing LaTeX transformations, it is never called during the build process.

@hcayless
Copy link
Member

hcayless commented May 9, 2017

@martindholmes Where do things stand with this issue?

@martindholmes
Copy link
Contributor Author

@hcayless The bad bugs in the FO/PDF transformation are fixed in Stylesheets. There's more cosmetic work that needs to be done, but nothing fails at this point. I've built a more comprehensive set of tests for FOP into my Stylesheets/Test2 work, and one of the tests involves an Exemplar ODD from the TEI repo. I think I was probably wrong to think that this stuff should be tested in the P5 repo, but Council should probably decide. If I was wrong to raise it here, we can back out of those commits I made and remove the stuff I added. I'm not absolutely sure what should be tested in which repo.

@hcayless hcayless removed this from the Guidelines 3.2.0 milestone Jun 26, 2017
@martinascholger
Copy link
Member

@martindholmes, @sydb - is this still a question in which repo this should be tested?

@martindholmes
Copy link
Contributor Author

I'm now more convinced of the value of Test2 and the irremediable mess that is Test, and I already have an FO test in Test2, which both generates the FO and builds it to PDF. I don't think it matters what happens in Test. Feel free to close this ticket unless someone objects.

@sydb sydb closed this as completed May 7, 2021
@martinascholger martinascholger added this to the Guidelines 4.3.0 milestone Aug 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants