Docbook to Epub not using my catalog
Docbook to Epub not using my catalog
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
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
Re: Docbook to Epub not using my catalog
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
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
<oXygen/> XML Editor
http://www.oxygenxml.com
Re: Docbook to Epub not using my catalog
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.
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.
Re: Docbook to Epub not using my catalog
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:
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
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>
....
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
<oXygen/> XML Editor
http://www.oxygenxml.com
Re: Docbook to Epub not using my catalog
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">
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">
Re: Docbook to Epub not using my catalog
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
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
<oXygen/> XML Editor
http://www.oxygenxml.com
Re: Docbook to Epub not using my catalog
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
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
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