Docbook to Epub not using my catalog

maglid
Posts: 64
Joined: Mon Sep 28, 2009 8:10 am

Docbook to Epub not using my catalog

Post by maglid » Sat Jan 09, 2021 2:51 am

Using Oxygen v23. I have a custom XML catalog that I use to publish Docbook content. I have this catalog set up in Oxygen's XML Catalog config. It works when I run the default Oxygen DocBook HTML transformation scenario.

But when I run the Oxygen DocBook EPUB or DocBook EPUB 3 scenarios, it fails with a bunch of errors that tell me it is not using my catalog.

Do I need to go into the epub catalog used by Oxygen and add my catalog?

Thanks,
Mark

maglid
Posts: 64
Joined: Mon Sep 28, 2009 8:10 am

Re: Docbook to Epub not using my catalog

Post by maglid » Sat Jan 09, 2021 2:59 am

By the way, if I make a simple Docbook file and run DocBook EPUB on it, it works fine.

Mark

Radu
Posts: 7399
Joined: Fri Jul 09, 2004 5:18 pm

Re: Docbook to Epub not using my catalog

Post by Radu » Mon Jan 11, 2021 9:13 am

Hi Mark,

Because EPUB transformations need to create the EPUB archive, they cannot be done with pure XSLT, they are done with a combination of ANT build files and XSLT.

There are two ANT build scripts, one for EPUB and one for EPUB3:

OXYGEN_INSTALL_DIR\frameworks\docbook\xsl\epub\bin\build.xml

OXYGEN_INSTALL_DIR\frameworks\docbook\xsl\epub3\build.xml

If you open them up, they both have places where they refer the main DocBook XML catalog and you can make changes there to add extra references to extra XML catalogs.

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

maglid
Posts: 64
Joined: Mon Sep 28, 2009 8:10 am

Re: Docbook to Epub not using my catalog

Post by maglid » Fri Feb 12, 2021 9:11 am

Thanks Radu, that worked for the catalog. Now the Epub3 build is failing with this error:

Transformation failed. Fatal error during transformation using C:\Program Files\Oxygen XML Editor 23\frameworks\docbook\xsl\epub3\images.xsl: Exception in extension function java.io.IOException: The filename, directory name, or volume label syntax is incorrect; SystemID: file:/C:/Program%20Files/Oxygen%20XML%20Editor%2023/frameworks/docbook/xsl/epub3/images.xsl; Line#: 33; Column#: -1

The Docbook files I am publishing work fine with the regular Oxygen Docbook HTML transformation scenario.

Radu
Posts: 7399
Joined: Fri Jul 09, 2004 5:18 pm

Re: Docbook to Epub not using my catalog

Post by Radu » Fri Feb 12, 2021 10:14 am

Hi,

If you duplicate and edit in the Oxygen "Configure Transformation Scenarios" dialog the "DocBook EPUB3" scenario, it has two parameters outputFile and xmlFile with values which are passed to the EPUB3 ANT build file. Do you have those parameters set in the transformation scenario on your side?
If so can you open the "OXYGEN_INSTALL_DIR/frameworks/docbook/xsl/epub3/build.xml" ANT build file and look for the target which copies images? Maybe you can add an extra "echo" to it to list the values of the "inputDir" and "outputDir" params:

Code: Select all

  <target name="images">
  <echo>Input dir: ${xmlFileDir} output dir: ${outputDir}</echo>
  ....
  
Do those parameters have the proper values?
You will find these logging details in the console view at the bottom of Oxygen after publishing.

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

maglid
Posts: 64
Joined: Mon Sep 28, 2009 8:10 am

Re: Docbook to Epub not using my catalog

Post by maglid » Sat Feb 13, 2021 1:17 am

build.xml seems to have the correct values for outputFile and xmlFile, I added your echo and got this in the log:

images:
[echo] Input dir: C:\Users\mark\git\client\doc\overview output dir: C:\Users\mark\git\client\doc\overview\out\epub3

Does that look correct? They look fine to me.

By the way, a lot of xhtml files get made before the epub3 build fails, and I looked at some of them. I noticed that in the epub3 xhtml, a link to an image looks like this (and it does not work in the browser):

<img src="file:/Users/mark/git/client/doc/overview/resources/ext_doc.png" width="11"/>

The same link in the Oxygen Docbook HTML output looks like this, and works in the browser to display the image:

<img src="../../resources/ext_doc.png" width="11">

Radu
Posts: 7399
Joined: Fri Jul 09, 2004 5:18 pm

Re: Docbook to Epub not using my catalog

Post by Radu » Mon Feb 15, 2021 8:32 am

Hi,

I'm not sure what's wrong, I'm performing my tests on this simple Docbook sample file bundled with the Oxygen samples folder OXYGEN_INSTALL_DIR/samples/docbook/v5/sample.xml and it works for me, the images are copied inside the EPUB and referenced correctly with relative paths from the HTML documents inside the EPUB.
What parameters do you pass in the DocBook to the EPUB3 transformation?
You are publishing using Oxygen, not the command line, correct?
Can you maybe put together a small minimal DocBook project exemplifying the problem and send it to us (support@oxygenxml.com)?

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

maglid
Posts: 64
Joined: Mon Sep 28, 2009 8:10 am

Re: Docbook to Epub not using my catalog

Post by maglid » Mon Feb 15, 2021 9:14 am

Thanks Radu.

It's an old, very complicated Docbook setup that is quite gnarly and I mainly run it using makefiles from the command line. But for this epub3 output I am running it from Oxygen. The makefiles I use are probably doing some copy operation that Oxygen knows nothing about, and that's why it is failing. I have decided this is not worth any more of my time.

Thanks for your help!
Mark

Post Reply