PDF XSL-FO won't compile in Oxygen 23.1

Having trouble installing Oxygen? Got a bug to report? Post it all here.
Carl
Posts: 102
Joined: Fri Oct 19, 2018 2:19 am

PDF XSL-FO won't compile in Oxygen 23.1

Post by Carl »

I just installed Oxygen XML Author v23.1 and now my PDF will not compile using the PDF based on XSL-FO transformation. It ends with this error:

Code: Select all

System ID: /home/clum/Oxygen XML Author 23/frameworks/dita/DITA-OT3.x/plugins/org.dita.pdf2/build.xml
Scenario: DITA Map PDF - based on XSL-FO - Copy
Input file: /home/clum/repos/docs-cust/PHEMI_Central/automation_plugins/automation_plugins.ditamap
Engine name: DITA-OT
Severity: error
Description: java.lang.RuntimeException: Failed to compile stylesheet '/home/clum/Oxygen XML Author 23/frameworks/dita/DITA-OT3.x/plugins/org.dita.pdf2.fop/xsl/fo/topic2fo_shell_fop.xsl': Errors were reported during stylesheet compilation
Start location: 280:0
When I loaded the same files in v22.1, my PDF compiled normally.

What does this error mean?
Radu
Posts: 9057
Joined: Fri Jul 09, 2004 5:18 pm

Re: PDF XSL-FO won't compile in Oxygen 23.1

Post by Radu »

HI Carl,

I need more details, you should find in the DITA OT console view at the bottom of Oxygen the actual XSLT stylesheet where the XSLT compilation breaks.
If you are unable to locate that compilation error, after the publishing breaks, please copy the entire contents from the "DITA OT" console view at the bottom of Oxygen, zip it and send it to us via email (support@oxygenxml.com).

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Carl
Posts: 102
Joined: Fri Oct 19, 2018 2:19 am

Re: PDF XSL-FO won't compile in Oxygen 23.1

Post by Carl »

Hi Radu. Is this what you're looking for?

Code: Select all

BUILD FAILED
/home/clum/Oxygen XML Author 23/frameworks/dita/DITA-OT3.x/plugins/org.dita.base/build.xml:29: The following error occurred while executing this line:
/home/clum/Oxygen XML Author 23/frameworks/dita/DITA-OT3.x/plugins/org.dita.pdf2/build.xml:148: The following error occurred while executing this line:
/home/clum/Oxygen XML Author 23/frameworks/dita/DITA-OT3.x/plugins/org.dita.pdf2/build.xml:280: java.lang.RuntimeException: Failed to compile stylesheet '/home/clum/Oxygen XML Author 23/frameworks/dita/DITA-OT3.x/plugins/org.dita.pdf2.fop/xsl/fo/topic2fo_shell_fop.xsl': Errors were reported during stylesheet compilation
	at org.dita.dost.module.XsltModule.execute(XsltModule.java:108)
	at org.dita.dost.ant.ExtensibleAntInvoker.execute(ExtensibleAntInvoker.java:189)
	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
	at jdk.internal.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:564)
	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:99)
	at org.apache.tools.ant.Task.perform(Task.java:350)
	at org.apache.tools.ant.Target.execute(Target.java:449)
	at org.apache.tools.ant.Target.performTasks(Target.java:470)
	at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1401)
	at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:36)
	at org.apache.tools.ant.Project.executeTargets(Project.java:1264)
	at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:437)
	at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:106)
	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
	at jdk.internal.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:564)
	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:99)
	at org.apache.tools.ant.Task.perform(Task.java:350)
	at org.apache.tools.ant.Target.execute(Target.java:449)
	at org.apache.tools.ant.Target.performTasks(Target.java:470)
	at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1401)
	at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:36)
	at org.apache.tools.ant.Project.executeTargets(Project.java:1264)
	at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:437)
	at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:106)
	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
	at jdk.internal.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:564)
	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:99)
	at org.apache.tools.ant.Task.perform(Task.java:350)
	at org.apache.tools.ant.Target.execute(Target.java:449)
	at org.apache.tools.ant.Target.performTasks(Target.java:470)
	at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1401)
	at org.apache.tools.ant.Project.executeTarget(Project.java:1374)
	at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
	at org.apache.tools.ant.Project.executeTargets(Project.java:1264)
	at org.apache.tools.ant.Main.runBuild(Main.java:827)
	at org.apache.tools.ant.Main.startAnt(Main.java:223)
	at org.apache.tools.ant.launch.Launcher.run(Launcher.java:284)
	at org.apache.tools.ant.launch.Launcher.main(Launcher.java:101)
Caused by: net.sf.saxon.s9api.SaxonApiException: Errors were reported during stylesheet compilation
	at net.sf.saxon.s9api.XsltCompiler.compile(XsltCompiler.java:793)
	at org.dita.dost.module.XsltModule.execute(XsltModule.java:106)
	... 43 more
Caused by: net.sf.saxon.trans.XPathException: Errors were reported during stylesheet compilation
	at net.sf.saxon.style.StylesheetModule.loadStylesheet(StylesheetModule.java:225)
	at net.sf.saxon.style.Compilation.compileSingletonPackage(Compilation.java:107)
	at net.sf.saxon.s9api.XsltCompiler.compile(XsltCompiler.java:788)
	... 44 more

Total time: 26 seconds

The process finished with exit code: 1
Radu
Posts: 9057
Joined: Fri Jul 09, 2004 5:18 pm

Re: PDF XSL-FO won't compile in Oxygen 23.1

Post by Radu »

Hi Carl,

I think a more detailed description of the error is in the 5-10 lines of console output which came before the lines you pasted.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Carl
Posts: 102
Joined: Fri Oct 19, 2018 2:19 am

Re: PDF XSL-FO won't compile in Oxygen 23.1

Post by Carl »

Here is the chunk from before "Build Failed":

Code: Select all

transform.topic2fo.main:
 [pipeline] Loading stylesheet /home/clum/Oxygen XML Author 23/frameworks/dita/DITA-OT3.x/plugins/org.dita.pdf2.fop/xsl/fo/topic2fo_shell_fop.xsl
 [pipeline] Warning at xsl:stylesheet on line 8 column 31 of layout-masters-attr.xsl:
 [pipeline]   Stylesheet module
 [pipeline]   file:/home/clum/Oxygen%20XML%20Author%2023/Customization/fo/attrs/layout-masters-attr.xsl
 [pipeline]   is included or imported more than once. This is permitted, but may lead to errors or
 [pipeline]   unexpected behavior
 [pipeline] Static error at xsl:call-template on line 100 column 52 of root-processing.xsl:
 [pipeline]   XTSE0680: Parameter msgnum is not declared in the called template
 [pipeline] Static error at xsl:call-template on line 100 column 52 of root-processing.xsl:
 [pipeline]   XTSE0680: Parameter msgsev is not declared in the called template
Radu
Posts: 9057
Joined: Fri Jul 09, 2004 5:18 pm

Re: PDF XSL-FO won't compile in Oxygen 23.1

Post by Radu »

Hi Carl,

Yes, that's the problem:

Code: Select all

 [pipeline] Static error at xsl:call-template on line 100 column 52 of root-processing.xsl:
 [pipeline]   XTSE0680: Parameter msgnum is not declared in the called template
One of your XSLT customization is using a parameter named "msgnum" in a call template something like this:

Code: Select all

    <xsl:call-template name="output-message">
      <xsl:with-param name="msgnum">000</xsl:with-param>
The "msgnum" parameter has been deprecated since DITA OT 2.3 and was probably removed in the latest DITA OT.
A call template to "output-message" using the new way of specifying parameters looks like this:

Code: Select all

    <xsl:call-template name="output-message">
      <xsl:with-param name="id" select="'DOTX066W'"/>
      <xsl:with-param name="msgparams">%1=getString</xsl:with-param>
    </xsl:call-template>
Maybe you should go over your entire XSLT customization, find the XSLT templates that you copied from the base DITA OT XSLTs and update those templates to contain the latest DITA OT changes.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Carl
Posts: 102
Joined: Fri Oct 19, 2018 2:19 am

Re: PDF XSL-FO won't compile in Oxygen 23.1

Post by Carl »

Sorry Radu, I forgot about this thread as I moved back to Oxygen 22.1 to avoid the problem.

So if I replace the problematic section with:

Code: Select all

    <xsl:call-template name="output-message">
      <xsl:with-param name="id" select="'DOTX066W'"/>
      <xsl:with-param name="msgparams">%1=getString</xsl:with-param>
    </xsl:call-template>
This should overcome this problem at least?

Unfortunately, our XSL customization was created by a contractor several years ago. I do not know Dita/XSL well enough to review all the customizations against the based templates and remove the out-of-date references.
Radu
Posts: 9057
Joined: Fri Jul 09, 2004 5:18 pm

Re: PDF XSL-FO won't compile in Oxygen 23.1

Post by Radu »

Hi Carl,

Yes. About your particular situation I'm afraid our tech support help does not cover migrating old XSL-FO based customizations. But if you have particular questions I can try to help as time allows.
Our present and future focus is on our CSS-based PDF publishing which allows to customize PDF using CSS and avoiding completely XSLT. If you choose this approach we can help with advice customizing the CSS.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Post Reply