S1000D - Images not included in PDF output

Having trouble installing Oxygen PDF Chemistry? Got a bug to report? Post it all here.
InspectorSpacetime
Posts: 44
Joined: Thu Jul 29, 2021 12:02 pm

S1000D - Images not included in PDF output

Post by InspectorSpacetime »

I'm creating PDFs from S1000D Data Modules using the "XML to PDF transformation with CSS" scenario (Chemistry). Using Oxygen XML Editor 28.1, latest build. The "Apply CSS stylesheets set in the current framework" is selected on.

The images (SVG) are declared as external entities and show up correctly in the Editor's author view. However, they are not included in the PDF output. I checked the .style intermediate XML file, and in fact no <css:content-on-element> is created, unlike when testing with a direct URL reference in the CSS file:

Code: Select all

graphic {
    content: oxy_url('some_image.svg');
}
All the Data Modules and images are in the same folder. There is no error about a file not being found. I see that in the S1000D framework CSS graphics are included like this, which does indeed work in the Editor view, but seems to not work in the PDF output:

Code: Select all

content: oxy_url(oxy_unparsed-entity-uri(attr(infoEntityIdent)));
julien_lacour
Posts: 804
Joined: Wed Oct 16, 2019 3:47 pm

Re: S1000D - Images not included in PDF output

Post by julien_lacour »

Hello,

At the moment, Oxygen PDF Chemistry does not fully support printing S1000D Data Modules, but this is on our roadmap and will be available in a future release. I’ve added your vote to the feature request, so you will be notified when it becomes available.

Regards,
Julien
InspectorSpacetime
Posts: 44
Joined: Thu Jul 29, 2021 12:02 pm

Re: S1000D - Images not included in PDF output

Post by InspectorSpacetime »

Hi Julien,

Thank you for your answer.

If we get technical, I assume the reason is that all entities are expanded prior to processing, and in that process the external entities are "left out", in lack of a better term? And therefore the oxy_unparsed-entity-uri function cannot target them?

In the meantime, since all our graphics are SVG's and the entity in the infoEntityIdent attribute matches the target file name (minus the file extension), we can do a workaround with some string manipulation:

Code: Select all

content: oxy_url(oxy_concat(attr(infoEntityIdent), '.svg'));
Are there plans to develop a publishing solution for S1000D Publication Modules as well?
julien_lacour
Posts: 804
Joined: Wed Oct 16, 2019 3:47 pm

Re: S1000D - Images not included in PDF output

Post by julien_lacour »

Hi,

From a technical perspective, the 'oxy_unparsed-entity-uri' function returns the URI of the unparsed entity provided as a parameter. In other words, if you define an entity in a Data Module as follows:

Code: Select all

<!ENTITY ICN-S1000DBIKE-AAA-DA10000-0-U8025-00515-A-04-1 SYSTEM "ICN-S1000DBIKE-AAA-DA10000-0-U8025-00515-A-04-1.CGM" NDATA cgm >
<dmodule>
    ...
    <graphic infoEntityIdent="ICN-S1000DBIKE-AAA-DA10000-0-U8025-00515-A-04-1"/>
</dmodule>
Calling 'oxy_unparsed-entity-uri(infoEntityIdent)' will return ICN-S1000DBIKE-AAA-DA10000-0-U8025-00515-A-04-1.CGM
This function behaves similarly to the XSL 'unparsed-entity-uri' function: https://www.w3.org/TR/xslt20/#unparsed-entity-uri

Regarding Publication Modules publishing, this is a more complex feature and it is not currently planned for implementation in the near future.

Regards,
Julien
Post Reply