DITA Map EPUB args.copycss is not working

Having trouble installing Oxygen? Got a bug to report? Post it all here.
gevin
Posts: 9
Joined: Thu Jul 28, 2016 10:09 am

DITA Map EPUB args.copycss is not working

Post by gevin »

Hello <Oxygen/> team,

I am using Oxygen version 21.0 for my project. DITA-OT 3.x working great to transform my project DITA map .ditamap to HTML5 website using DITA Map HTML5, It work perfectly, which included a customize CSS file.

I am currently trying to transform the same project to ePub version, using build in DITA Map EPUB scenario type, but face some problem. This DITA Map EPUB scenario type fail to copy the custom CSS file to the ePub package even args.copycss, args.css setting are set correctly (same setting for DITA Map HTML5).

For example, if i have a custom CSS file proj_01.css in the directory c:\projects\proj_01\css and i wish to include this CSS file in the EPUB,

This is what I specify to these Ant parameter args.css with the value like:
  • args.copycss as "yes"
  • args.cssroot as "c:\projects\proj_01\css"
  • args.css as "proj_01.css"
  • args.csspath as "css"
Do you mind to help me on this issue?

Thank you very much.
Radu
Posts: 9018
Joined: Fri Jul 09, 2004 5:18 pm

Re: DITA Map EPUB args.copycss is not working

Post by Radu »

Hi,

Try to remove the "args.cssroot" and "args.csspath" parameters and set the "args.css" parameter to "c:\projects\proj_01\css\proj_01.css".
If this still will not work I will try to take a look at it.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
gevin
Posts: 9
Joined: Thu Jul 28, 2016 10:09 am

Re: DITA Map EPUB args.copycss is not working

Post by gevin »

Hi Radu,

Thank you for help.

i have tried the suggestion you just posted, but still not working. :(

any other idea?

Regards,
Gevin
gevin
Posts: 9
Joined: Thu Jul 28, 2016 10:09 am

Re: DITA Map EPUB args.copycss is not working

Post by gevin »

Hi Radu,

Thank you for your reply. I tried your suggestion to remove remove the "args.cssroot" and "args.csspath" parameters and set the "args.css" parameter to "c:\projects\proj_01\css\proj_01.css", but the result still the same DiTA-OT does not copy the customize CSS file into to the ePub package.

Best regards,
Gevin
Radu
Posts: 9018
Joined: Fri Jul 09, 2004 5:18 pm

Re: DITA Map EPUB args.copycss is not working

Post by Radu »

Hi Gevin,

I reproduced the problem on my side and added an internal issue to fix it.
As a workaround if you open the ANT build file:

OXYGEN_INSTALL_DIR\frameworks\dita\DITA-OT3.x\plugins\org.dita4publishers.epub\build_transtype-epub.xml

it has there a target which looks like this:

Code: Select all

 <target name="epub.xhtml.init" if="isOT2">
You can try to remove the if="isOT2" attribute from it and try to publish again.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
gevin
Posts: 9
Joined: Thu Jul 28, 2016 10:09 am

Re: DITA Map EPUB args.copycss is not working

Post by gevin »

Hi Radu,

Thank you for the temporary fix. I removed the if="isOT2" attribute from it and publish again, and this fixed the args.copycss issue.

Everything working perefectly now!
Radu wrote: Mon Oct 21, 2019 12:06 pm ....
As a workaround if you open the ANT build file:

OXYGEN_INSTALL_DIR\frameworks\dita\DITA-OT3.x\plugins\org.dita4publishers.epub\build_transtype-epub.xml

it has there a target which looks like this:

Code: Select all

 <target name="epub.xhtml.init" if="isOT2">
Good job, i am very appreciated for your help.

Best regards,
Gevin
gevin
Posts: 9
Joined: Thu Jul 28, 2016 10:09 am

Re: DITA Map EPUB args.copycss is not working

Post by gevin »

Hi Radu,

another question,

In the ePub 3 package have a file named "nav.xhtml" that is used for a Reading Systems to retrieve navigational information. DITA-OT ePub generated content.opf which listed "nav.xhtml" as 1st item in <spine> section, this result an extra/duplicated Content page appear before actual contents.

Is there any way to remove <itemref idref="nav"/> from <spine toc="ncx"> section using DITA-OT parameter?

Thank you.

Best regards,
Gevin
Radu
Posts: 9018
Joined: Fri Jul 09, 2004 5:18 pm

Re: DITA Map EPUB args.copycss is not working

Post by Radu »

Hi Gevin,

I do not see a parameter to control this. There is an XSLT template:

OXYGEN_INSTALL_DIR\frameworks\dita\DITA-OT3.x\plugins\org.dita4publishers.epub\xsl\map2epubOpfImpl.xsl

which has a template which outputs it:

Code: Select all

  <xsl:template match="*[df:class(., 'map/map')]" mode="spine">
    <xsl:param name="doDebug" as="xs:boolean" tunnel="yes" select="false()"/>
     <!-- Generate entries for each of the navigation files to be generated. -->
    <xsl:if test="$epubtrans:isEpub3">
      <itemref idref="{epubtrans:getNavId('toc')}"/>
    </xsl:if>
  </xsl:template>
so commenting that xsl:if should accomplish what you want. But I saw that the table of contents seems to disappear completely from the book so I'm not sure this is what you want.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
gevin
Posts: 9
Joined: Thu Jul 28, 2016 10:09 am

Re: DITA Map EPUB args.copycss is not working

Post by gevin »

Hi Radu,

Thank you for your "hack" to modify the XSLT to meet my need. For my case, the ePub reader like iBook, Adobe Digital Edition or Vital Source will genarate their own version of Table of contents based on nav.xhtml, but don't need use as page in the book.

That mean, nav.xhtml is needed in the ePub package, but do not need to be display as content page or list as part of the book spine.

Thank you very much for your help again.

Best regards,
Gevin
Radu
Posts: 9018
Joined: Fri Jul 09, 2004 5:18 pm

Re: DITA Map EPUB args.copycss is not working

Post by Radu »

Hi,

As an update we released Oxygen version 22 and it should have the fix for the first reported problem included.

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