Getting images to work in DB epub ANT transformation
Getting images to work in DB epub ANT transformation
Hi,
I'm working with the Docbook to ePub transform you guys built in ANT. I'm doing very heavy customization of the underlying DocBook XSL to get the output I want. One problem I've been running into is that the ANT transform fails when I try to insert an image via XSLT. For example, I've customized my titlepage to output an image file.
The correct img tag with the correct path to the image is inserted, but your image.xsl stylesheet chokes because it can't find the image to copy. I think it is looking for the image in the XML directory, but I store my epub image files elsewhere. Is it possible to redirect where the ANT process locates images?
I'm working with the Docbook to ePub transform you guys built in ANT. I'm doing very heavy customization of the underlying DocBook XSL to get the output I want. One problem I've been running into is that the ANT transform fails when I try to insert an image via XSLT. For example, I've customized my titlepage to output an image file.
Code: Select all
<div class="titlepage-logo">
<xsl:element name="img">
<xsl:attribute name="alt">My Logo</xsl:attribute>
<xsl:attribute name="src">
<xsl:text>images/</xsl:text>
<xsl:value-of select="$ebook.titlepage.logo.filename"/>
</xsl:attribute>
</xsl:element>
</div>
Re: Getting images to work in DB epub ANT transformation
Hi,
We will try to improve on the Docbook to EPUB transformation and add a parameter to specify where the images folder is located.
In the meantime you could make some modifications to the ANT build file:
OXYGEN_INSTALL_DIR/frameworks/docbook/xsl/epub/bin/build.xml
it contains a target called:
which sends a couple of parameters to the images.xsl called:
In your case you should probably change the xmlFileDir to be the place where the images folder is located and imagesDir to be the name of the images directory.
You can also add some xsl:messages in the images.xsl to see how the templates are called.
Regards,
Radu
We will try to improve on the Docbook to EPUB transformation and add a parameter to specify where the images folder is located.
In the meantime you could make some modifications to the ANT build file:
OXYGEN_INSTALL_DIR/frameworks/docbook/xsl/epub/bin/build.xml
it contains a target called:
Code: Select all
<target name="images">....
Code: Select all
<param name="inputDir" expression="${xmlFileDir}"/>
<param name="imagesDir" expression="images"/>
You can also add some xsl:messages in the images.xsl to see how the templates are called.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
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