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

ODD to PDF conversions fail (maybe a Stylesheets issue?) #15

Open
martindholmes opened this issue Dec 20, 2016 · 7 comments
Open

ODD to PDF conversions fail (maybe a Stylesheets issue?) #15

martindholmes opened this issue Dec 20, 2016 · 7 comments

Comments

@martindholmes
Copy link
Contributor

Converting ODDs to PDF in Oxygen currently fails with the bleeding-edge plugin. Try:

TEI/P5/Test/testcorpus.odd

You get: "Effective boolean value is not defined for a sequence of two or more items starting with a boolean" in fo_figures.xsl line 336

Try:

TEI/P5/Test/relatedItem.odd

You get: "A sequence of more than one item is not allowed as the result of function tei:generateRefPrefix() ("relatedItem", "relatedItem")" in teiodds.xsl line 2382.

Could someone running the stable plugin and someone running with the default Oxygen framework in 18.1 please test and report back?

@lb42
Copy link
Member

lb42 commented Dec 20, 2016

I think this has been broken for quite a while. Certainly I noticed it before upgrading to the new framework. Line 336 of fo_figures.xsl reads

  <xsl:if test="not(ancestor::tei:table/tei:match(@rend,'tight'))">

which I think should probably be

 <xsl:if test="not(ancestor::tei:table[tei:match(@rend,'tight')])">

@lb42 lb42 closed this as completed Dec 20, 2016
@lb42 lb42 reopened this Dec 20, 2016
@lb42
Copy link
Member

lb42 commented Dec 20, 2016

... and yes, I can confirm both these errors are still there with oXygen 18.1 after having uninstalled the bleeding edge framework release (i.e. with no add ons). Definitely a stylesheets issue imho.

@lb42
Copy link
Member

lb42 commented Dec 20, 2016

I made the correction suggested above, and now it fails a bit further on, in a way that needs more knowledge of FOP than I have:

System ID: /home/lou/Public/TEI/P5/Exemplars/tei_bare.odd_xslt
Scenario: TEI ODD PDF
XML file: /home/lou/Public/TEI/P5/Exemplars/tei_bare.odd
XSL file: /home/lou/.com.oxygenxml/extensions/v18.1/frameworks/http___teijenkins.hcmc.uvic.ca_job_oxygen_tei_bleeding_lastSuccessfulBuild_artifact_oxygen_tei_updateSite.oxygen/tei/xml/tei/stylesheet/odds/odd2odd.xsl
Document type: TEI ODD
Engine name: Apache FOP
Severity: error
Description: The process 'Apache FOP' ended with code: 1.
The error was:
FATAL - Unsupported TrueType font: No Unicode or Symbol cmap table not present. Aborting
FATAL - Unsupported TrueType font: No Unicode or Symbol cmap table not present. Aborting
ERROR - net.sf.saxon.trans.XPathException: org.apache.fop.fo.ValidationException: Missing attribute on fo:basic-link: Either external-destination or internal-destination must be specified. (See position 1616:-1)
ERROR - Exception
org.apache.fop.apps.FOPException: org.apache.fop.fo.ValidationException: Missing attribute on fo:basic-link: Either external-destination or internal-destination must be specified. (See position 1616:-1)
net.sf.saxon.trans.XPathException: org.apache.fop.fo.ValidationException: Missing attribute on fo:basic-link: Either external-destination or internal-destination must be specified. (See position 1616:-1)
at org.apache.fop.cli.InputHandlerFOP.transformTo(Unknown Source)
at org.apache.fop.cli.InputHandlerFOP.renderTo(Unknown Source)
at org.apache.fop.cli.Main.startFOP(Main.java:186)
at org.apache.fop.cli.Main.main(Main.java:217)
Caused by: net.sf.saxon.trans.XPathException: org.apache.fop.fo.ValidationException: Missing attribute on fo:basic-link: Either external-destination or internal-destination must be specified. (See position 1616:-1)
at net.sf.saxon.event.ContentHandlerProxy.handleSAXException(Unknown Source)
at net.sf.saxon.event.ContentHandlerProxy.startContent(Unknown Source)
at net.sf.saxon.event.NamespaceReducer.startContent(NamespaceReducer.java:215)
....

Start location: 1616:0

@lb42
Copy link
Member

lb42 commented Dec 20, 2016

BTW, converting an ordinary TEI document (e.g. Exemplars/simplePrint.tei) to PDF seems to work fine.

@martindholmes
Copy link
Contributor Author

This needs some careful attention. I do know FO, so I can take a look at it. I would dearly love to be able to replace the current LaTeX-based build of the Guidelines with an FO version, so this might be a good start into the process.

@lb42
Copy link
Member

lb42 commented Dec 21, 2016

Following Alex's observation on another ticket, I got rid of the "fo_figures.xsl" error by changing the line in question to read

 <xsl:if test="not(ancestor::tei:table[1]/tei:match(@rend,'tight'))">

but PDF generation still fails. The problem is now in the FO generation, which fails when processing a <dataRef> that uses @name rather than @key. With the latter, the FO code generated includes a pointer to the TEI data definition; with the former it cannot. But you can't have an empty pointer in FO, so this fails.

@lb42
Copy link
Member

lb42 commented Dec 21, 2016

Cf. Stylesheet bug TEIC/Stylesheets#203

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

2 participants