DITA-OT 3.2 re-importing xsl or How to see more xsl:messages in logging?
Post here questions and problems related to editing and publishing DITA content.
-
- Posts: 11
- Joined: Tue Aug 23, 2016 6:18 pm
DITA-OT 3.2 re-importing xsl or How to see more xsl:messages in logging?
Post by Quick van Rijt »
I am using DITA-OT 3.2 out of the box with a custom plugin i am developing.
I am just relying on the $plugin/cfg/fo/attrs/custom.xls and similar xsl/custom.xsl.
I am not using any args.xsl.pdf in my initialization target.
My code is validated all well by OxygenXml 19.1.
Part of my fo:attribute customization is reflected in the output, so my code is processed by the FOP formatter.
When running the DITA-OT by commandline, i get multiple warnings about "*.xsl included or imported more than once. ". I have read somewhere from Mickael Kay these warnings are an feature/artefact introduced with the Saxon-HE-9.8.0(-12).jar.
I am suspecting a logger limitation, because i only see just one of my xsl:message lines, while there should be plenty.
My question:
- are there any known issues for DITA-OT 3.x about re-importing core xsl at the end of workflow for FOP PDF (causing the warnings)
- or, is there a way to increase the list of logger output so i can see all of my messages?
I am just relying on the $plugin/cfg/fo/attrs/custom.xls and similar xsl/custom.xsl.
I am not using any args.xsl.pdf in my initialization target.
My code is validated all well by OxygenXml 19.1.
Part of my fo:attribute customization is reflected in the output, so my code is processed by the FOP formatter.
When running the DITA-OT by commandline, i get multiple warnings about "*.xsl included or imported more than once. ". I have read somewhere from Mickael Kay these warnings are an feature/artefact introduced with the Saxon-HE-9.8.0(-12).jar.
I am suspecting a logger limitation, because i only see just one of my xsl:message lines, while there should be plenty.
My question:
- are there any known issues for DITA-OT 3.x about re-importing core xsl at the end of workflow for FOP PDF (causing the warnings)
- or, is there a way to increase the list of logger output so i can see all of my messages?
Code: Select all
[echo] Copy bookmap relative images/cover-*.png to artwork/covers/cover-background.png
[copy] Warning: E:\DocFactory\testsuite\src\cover-text\dita\images\covers does not exist.
[pipeline] Warning at xsl:stylesheet on line 44 column 19 of commons.xsl:
[pipeline] Stylesheet module commons.xsl is included or imported more than once. This is permitted,
[pipeline] but may lead to errors or unexpected behavior
[pipeline] Warning at xsl:stylesheet on line 43 column 19 of topic.xsl:
[pipeline] Stylesheet module topic.xsl is included or imported more than once. This is permitted, but
[pipeline] may lead to errors or unexpected behavior
[pipeline] Warning at xsl:stylesheet on line 43 column 19 of concept.xsl:
[pipeline] Stylesheet module concept.xsl is included or imported more than once. This is permitted,
[pipeline] but may lead to errors or unexpected behavior
[pipeline] Warning at xsl:stylesheet on line 36 column 19 of static-content.xsl:
[pipeline] Stylesheet module static-content.xsl is included or imported more than once. This is
[pipeline] permitted, but may lead to errors or unexpected behavior
[pipeline] Warning at xsl:stylesheet on line 43 column 19 of topic.xsl:
[pipeline] Stylesheet module topic.xsl is included or imported more than once. This is permitted, but
[pipeline] may lead to errors or unexpected behavior
[pipeline] Warning at xsl:stylesheet on line 15 column 17 of tables.xsl:
[pipeline] Stylesheet module tables.xsl is included or imported more than once. This is permitted,
[pipeline] but may lead to errors or unexpected behavior
[pipeline] Warning at xsl:stylesheet on line 38 column 19 of front-matter.xsl:
[pipeline] Stylesheet module front-matter.xsl is included or imported more than once. This is
[pipeline] permitted, but may lead to errors or unexpected behavior
[pipeline] *** Default cover background image: Customization/OpenTopic/common/artwork/covers/cover-background.png
--------------------------------------
Results
--------------------------------------
Regards
Quick van Rijt
Professional user of Oxygen XML and DITA OT
Quick van Rijt
Professional user of Oxygen XML and DITA OT
-
- Posts: 9438
- Joined: Fri Jul 09, 2004 5:18 pm
Re: DITA-OT 3.2 re-importing xsl or How to see more xsl:messages in logging?
Dear Quick,
Besides the xsl:messages not showing up you also have those parts of your customization not working right? Do you consider that some xsl:templates are not getting called?
Here's a story about something which may or may not be related to your problem:
Recently one of our clients gave us a PDF plugin with a similar problem, in her "custom.xsl" (the main PDF customization XSLT) she had a reference to:
and the "front-matter.xsl" was placed in the same folder. One of her templates in the front-matter.xsl was not called at all by the latest Saxon.
Once I renamed the "front-matter.xsl" to some other name and then also renamed it in the xsl:import, the template started getting called.
So I do think the Saxon 9 library bundled with DITA OT 3.2 has some problems with imports but I have not been able until now to create a small XML + XSLT example so that I may open an issue on the Saxon issues list.
What I could try to do (and what you could also try to do on your side) would be to update the used Saxon libraries to Saxon 9.9 and try to use them instead.
Regards,
Radu
Besides the xsl:messages not showing up you also have those parts of your customization not working right? Do you consider that some xsl:templates are not getting called?
Here's a story about something which may or may not be related to your problem:
Recently one of our clients gave us a PDF plugin with a similar problem, in her "custom.xsl" (the main PDF customization XSLT) she had a reference to:
Code: Select all
<xsl:import href="front-matter.xsl"/>
Once I renamed the "front-matter.xsl" to some other name and then also renamed it in the xsl:import, the template started getting called.
So I do think the Saxon 9 library bundled with DITA OT 3.2 has some problems with imports but I have not been able until now to create a small XML + XSLT example so that I may open an issue on the Saxon issues list.
What I could try to do (and what you could also try to do on your side) would be to update the used Saxon libraries to Saxon 9.9 and try to use them instead.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 11
- Joined: Tue Aug 23, 2016 6:18 pm
Re: DITA-OT 3.2 re-importing xsl or How to see more xsl:messages in logging?
Post by Quick van Rijt »
Exactly what i am experiencing also.
With Saxon-HE-9.8.0-12, whatever i tried, it will not override [Codebox=]<xsl:template name="createFrontMatter">[/Codebox]
With OxygenXML 19.1 (may-2018, which includes Saxon-9EE in classpath) pointing to this the 3.2 toolkit runtime with my plugin, it does work and shows all my xsl:messages!
My line of thinking too, following your suggesting, to try Saxon 9.9-HE.
With Saxon-HE-9.8.0-12, whatever i tried, it will not override [Codebox=]<xsl:template name="createFrontMatter">[/Codebox]
With OxygenXML 19.1 (may-2018, which includes Saxon-9EE in classpath) pointing to this the 3.2 toolkit runtime with my plugin, it does work and shows all my xsl:messages!
My line of thinking too, following your suggesting, to try Saxon 9.9-HE.
Regards
Quick van Rijt
Professional user of Oxygen XML and DITA OT
Quick van Rijt
Professional user of Oxygen XML and DITA OT
-
- Posts: 11
- Joined: Tue Aug 23, 2016 6:18 pm
Re: DITA-OT 3.2 re-importing xsl or How to see more xsl:messages in logging?
Post by Quick van Rijt »
I downloaded saxon9he.jar, renamed and insert it as Saxon-HE-9.9.0.2.jar into $ditaot/lib, and renamed the current one to *.DISABLED.
I ran:
dita.bat -d -i path\to\bookmap.ditamap -f pdf
dita.bat -d -i path\to\bookmap.ditamap -f myplugin-pdf
Both calls result in the following error :
Clearly pointing to the log message handler
, ANSI/UNICODE characters issue in the source code?
I ran:
dita.bat -d -i path\to\bookmap.ditamap -f pdf
dita.bat -d -i path\to\bookmap.ditamap -f myplugin-pdf
Both calls result in the following error :
Code: Select all
map-mapref:
Property "dita.preprocess.reloadstylesheet" has not been set
Property "user.input.file" has not been set
[mapref] Processing file:/E:/DocFactory/testsuite/temp/6d16a8ddca687351717edf8330fbb22281f9eeb1.ditamap
[antcall] Exiting D:\DITAOT-RT\dita-ot-3.2_default\build.xml.
Error: java.lang.NoSuchMethodError: net.sf.saxon.Controller.setMessageEmitter(Lnet/sf/saxon/event/Receiver;)V

Regards
Quick van Rijt
Professional user of Oxygen XML and DITA OT
Quick van Rijt
Professional user of Oxygen XML and DITA OT
-
- Posts: 11
- Joined: Tue Aug 23, 2016 6:18 pm
Re: DITA-OT 3.2 re-importing xsl or How to see more xsl:messages in logging?
Post by Quick van Rijt »
I restored the toolkit to the DITA-OT 3.2 release.
For my plugin, I renamed all mentioned import files in my $plugin/cfg/fo/xsl/custom.xsl by prefixing with 'Q-'.
It works! No render errors and all front-matter template overrides and other customizations are applied!
Even importing files with empty content, are not a problem anymore
For my plugin, I renamed all mentioned import files in my $plugin/cfg/fo/xsl/custom.xsl by prefixing with 'Q-'.
It works! No render errors and all front-matter template overrides and other customizations are applied!
Even importing files with empty content, are not a problem anymore

Regards
Quick van Rijt
Professional user of Oxygen XML and DITA OT
Quick van Rijt
Professional user of Oxygen XML and DITA OT
-
- Posts: 9438
- Joined: Fri Jul 09, 2004 5:18 pm
Re: DITA-OT 3.2 re-importing xsl or How to see more xsl:messages in logging?
Hi Quick,
It seems that DITA OT 3.2 would need slight changes to its Java code in order to work with Saxon 9.9. Anyway I added an issue for this:
https://github.com/dita-ot/dita-ot/issues/3156
but I'm glad the workaround is fine for you.
Regards,
Radu
It seems that DITA OT 3.2 would need slight changes to its Java code in order to work with Saxon 9.9. Anyway I added an issue for this:
https://github.com/dita-ot/dita-ot/issues/3156
but I'm glad the workaround is fine for you.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Return to “DITA (Editing and Publishing DITA Content)”
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service