SVG cannot open in Oxygen but opens fine in Chrome

Oxygen general issues.
csun
Posts: 31
Joined: Wed Dec 20, 2017 9:56 pm

SVG cannot open in Oxygen but opens fine in Chrome

Post by csun »

Hi, Oxygen Team.

When I tried to embed an SVG image (please find it attached--need to unzip to see the SVG
has_issues_in_Oxygen_viewer.7z
(1.45 KiB) Downloaded 56 times
) in my DocBook XML, in Oxygen Author 24.1 it displayed an error:
Oxygen_AuthorMode.png
Oxygen_AuthorMode.png (14.05 KiB) Viewed 451 times
Then I tried opening it in Oxygen SVG viewer (Tools -> SVG Viewer), and it threw a couple of error messages:
errors_in_Oxygen_SVG_viewer.png
errors_in_Oxygen_SVG_viewer.png (30.07 KiB) Viewed 451 times
However, it opens without issues in the Web browsers like Chrome, Edge, and Firefox. Moreover, I embedded it in a DocBook XML file and published both HTML and PDF output from it (using some process outside Oxygen), and it showed up in the output without issues.

Does it mean that the SVG validation in Oxygen is more rigorous than that in the web browsers and PDF? Is there a way to loosen up the validation in Oxygen, so that it displays an SVG in Author mode, as long as the SVG can display properly in HTML and PDF?

Thanks,
Charles
Radu
Posts: 9059
Joined: Fri Jul 09, 2004 5:18 pm

Re: SVG cannot open in Oxygen but opens fine in Chrome

Post by Radu »

Hi Charles,
Thanks for the problem report and for the sample, I can reproduce the problem on my side using the sample.
Please see some remarks below:
Does it mean that the SVG validation in Oxygen is more rigorous than that in the web browsers and PDF?
Oxygen uses for rendering SVGs in the Author visual editing mode and for producing PDFs using its default transformation scenarios an open source library named Apache Batik. This library is a bit more primitive than the libraries used in a web browser. It is also more strict and may break more easily if it does not like certain constructs. We'll see what we can do about this starting from your sample content, if we manage to improve the library in a future Oxygen version we will let you know.
Is there a way to loosen up the validation in Oxygen, so that it displays an SVG in Author mode, as long as the SVG can display properly in HTML and PDF?
For me the SVG does not display at all both in the visual editor and in the PDF output obtained with Oxygen's default "DITA Map PDF - based on HTML5 & CSS" transformation scenario. Is it possible that for the PDF output you are using some other commercial engine? Maybe Antenna House or Miramo?

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
csun
Posts: 31
Joined: Wed Dec 20, 2017 9:56 pm

Re: SVG cannot open in Oxygen but opens fine in Chrome

Post by csun »

Thanks for your reply, Radu.
Oxygen uses for rendering SVGs in the Author visual editing mode
Was there a missing word here? Or does Oxygen use Apache Batik for rendering SVGs in the Author visual editing mode, too (besides for producing PDFs)?
Is it possible that for the PDF output you are using some other commercial engine? Maybe Antenna House or Miramo?
Yes, in my experiment I used Antenna House to produce the PDF output.

Thanks for considering improving the library in a future Oxygen version; I look forward to hearing from you about that.

Cheers,
Charles
julien_lacour
Posts: 498
Joined: Wed Oct 16, 2019 3:47 pm

Re: SVG cannot open in Oxygen but opens fine in Chrome

Post by julien_lacour »

Hello,

We just released Oxygen 26.1, in this version these errors should not appear on SVGs anymore and the image should display in Author mode.

Regards,
Julien
Post Reply