Giter Site home page Giter Site logo

Comments (3)

raducoravu avatar raducoravu commented on July 23, 2024

Just to note what I've done on my side to step over this problem, in the XSLT stylesheet:
org.dita4publishers.common.xslt/xsl/map2graphicMap.xsl

there is a variable like:

      <xsl:variable name="absoluteUrl" as="xs:string"
  select="relpath:newFile($inputdirUrl, concat($uplevels, .))"
/>

and I re-wrote it like:

     <xsl:variable name="absoluteUrl" as="xs:string"
  select="relpath:toUrl(relpath:newFile($inputdirUrl, concat($uplevels, .)))"
/>

This should make the copy graphics work again.

Other fixes I made for making the resulting EPUB valid:
In the XSLT stylesheet:
org.dita4publishers.epub/xsl/html2xhtmlImpl.xsl

I added the XSLT templates:

          <xsl:template match="nav | section | figure | article" mode="html2xhtml" priority="20">
            <div>
              <xsl:apply-templates select="@* except (@role, @aria-labelledby) | node()" mode="html2xhtml"/>
            </div>
          </xsl:template>

          <!-- Group for root document node does not need extra XHTML div -->
          <xsl:template match="main/article" mode="html2xhtml" priority="30">
            <xsl:apply-templates select="node()" mode="html2xhtml"/>
          </xsl:template>

          <xsl:template match="header | footer | main" mode="html2xhtml" priority="20">
            <xsl:apply-templates select="node()" mode="html2xhtml"/>
          </xsl:template>

          <xsl:template match="div/@role" mode="html2xhtml" priority="10"/>

which convert from HTML 5 constructs to more base constructs.

And in the build file:
plugins/org.dita4publishers.epub/build_transtype-epub_template.xml
I defined this property:

    <dirname property="dita.input.dirname" file="${args.input}" />

which is used by the build but at least on my side it was no longer defined in DITA OT 2.x.

from org.dita4publishers.epub.

raducoravu avatar raducoravu commented on July 23, 2024

Also in the XSLT stylesheet:

org.dita-community.common.xslt/xsl/relpath_util.xsl

in the functions named "relpath:getName" and "relpath:getParent" I replaced the Windows style "" separator with "/" before tokenizing the input.

from org.dita4publishers.epub.

drmacro avatar drmacro commented on July 23, 2024

Closing this issue because it will be subsumed into new issue 89. Will incorporate Radu's fixes where they are still relevant.

from org.dita4publishers.epub.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.