Menu

#191 Problem with graphic paths constructed by d4p causes ePUB generation failure on Windows

Current_release
open
None
1
2014-10-09
2014-10-09
Anonymous
No

Eliot - A month later I'm finally submitting -

When installed locally on Windows, my epub output was failing. I've corrected the problem with local XSLT changes. Attached is revised XSLT, but I suspect you'd want to effect the change in a different location (or tell me this is a Saxon version issue).

I confirmed that the issue still present in 0.9.19RC12Issue189.

The reported error is:
copy-graphics:
[echo] Doing copy graphics...
BUILD FAILED
C:\dev\rsuite\rsuite4-1\rsuite\integration\DITA-OT1.6.3\build.xml:47: The following error occurred while executing this line:
C:\dev\rsuite\rsuite4-1\rsuite\integration\DITA-OT1.6.3\plugins\net.source forge.dita4publishers.epub\build_transtype-epub.xml:173: The following error occurred while executing this line:
C:\dev\rsuite\rsuite4-1\rsuite\integration\DITA-OT1.6.3\plugins\net.source forge.dita4publishers.epub\build_transtype-epub.xml:178: The following error occurred while executing this line:
C:\dev\rsuite\rsuite4-1\rsuite\tomcat\temp\27\epub_temp\copy-graphics.xml: 7: C:\dev\rsuite\rsuite4-1\rsuite\integration\DITA-OT1.6.3{cannot convert absolute URL to file path} does not exist.

The source XML is fine and renders to PDF using d4p without problem.

When I look at the copy-graphics.xml build script generated during the process, I see entries like:
<copy tofile="C:\dev\rsuite\rsuite4-1\rsuite\tomcat\temp\50\epub_temp\images\AlternativeFuels_05.png" overwrite="yes" failonerror="false">
<fileset dir="{cannot convert absolute URL to file path}">
<include name="AlternativeFuels_05.png">
</include></fileset>
</copy>

Obviously the @dir value is the problem. Through adding some logging to graphicMap2AntCopyScript.xsl, I found that the value of gmap:graphic-map-item/@input-url, which is used to populate fileset/@dir, looks like
C:\dev\rsuite\rsuite4-1\rsuite\temp\AlternativeFuels/images/AlternativeFuels_04.png

By adjusting graphicMap2AntCopyScript.xsl, I changed the value used for fileset/@dir to
file:/C:/dev/rsuite/rsuite4-1/rsuite/temp/AlternativeFuels/images/AlternativeFuels_04.png

and now everything runs successfully.

Lisa

1 Attachments

Discussion

Anonymous
Anonymous

Add attachments
Cancel





MongoDB Logo MongoDB