[oXygen-user] docbook to epub: css, namespaces, etc

Robert Nagle idiotprogrammer at gmail.com
Sun Oct 16 22:56:29 CDT 2011


Hi, I'm trying to use Oxygen to make docbook transform to epub.

I am still trying to understand what is going on.

I created a simple dummy.xml with a sample customization layer. rj.xsl

The customization layer only has three lines:

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns="http://www.w3.org/1999/xhtml" xmlns:d="http://docbook.org/ns/docbook"
    xmlns:date="http://exslt.org/dates-and-times"
xmlns:saxon="http://icl.com/saxon"
    exclude-result-prefixes="d date saxon" version="1.0">
    <xsl:param name="chapter.autolabel" select="0"/>
    <xsl:param name="html.stylesheet">testing.css</xsl:param>

To make it work in Oxygen, I cloned and edited the epub scenario, and
add a parameter using the parameters tab of the Edit Ant Scenario
dialog.
name = rjxsl
value = ${pd}/oxygen-test.xsl

But when I run it, it produces an epub file and the html code doesn't
seem to reflect the css reference or chapter.autolabel parameter.

This is strange because the build.xml file seems to reference the
rj.xsl file path correctly.

Two other  things. I would expect that the testing.css (which is
located in the project directory) to be copied to the appropriate
output directory. But I do not see it copied there (although the
image(s) are copied successfully there). Also, the css is not listed
in the content.opf file.

Please note that the db2epub.py seems to process the same project correctly.

Also, when I inspect the html files in the out directory, I see this
message in the head:

<meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1"/>

My understanding is that there are incompatibilities between the
DocBook XSL-NS stylesheets and the epub transformation. I've been
warned by Keith Fahlgren not to use the XSL-NS stylesheets.

This fact was alluded to in a recent thread about the epub3 beta
stylesheets, but my understanding is that this applies both to the
epub3 beta and the current epub.
(See http://lists.oasis-open.org/archives/docbook-apps/201110/msg00001.html )

I appreciate your help.


**************************************
Here is the ant file.


Executing:
"c:\program files (x86)\oxygen xml editor 13\jre/bin/java" -Xmx256m
-classpath "C:\Program Files (x86)\Oxygen XML Editor
13/tools/ant/lib/ant-launcher.jar" "-Dant.home=C:\Program Files
(x86)\Oxygen XML Editor 13/tools/ant"
org.apache.tools.ant.launch.Launcher -lib "C:\Program Files
(x86)\Oxygen XML Editor 13\classes" -lib "C:\Program Files
(x86)\Oxygen XML Editor 13\lib\oxygen.jar" -lib "C:\Program Files
(x86)\Oxygen XML Editor 13\lib\oxygenAuthor.jar" -lib "C:\Program
Files (x86)\Oxygen XML Editor 13\lib\oxygenDeveloper.jar" -lib
"C:\Program Files (x86)\Oxygen XML Editor 13\lib\oxygenEclipse.jar"
-lib "C:\Program Files (x86)\Oxygen XML Editor
13\lib\oxygenAuthorEclipse.jar" -lib "C:\Program Files (x86)\Oxygen
XML Editor 13\lib\oxygenDeveloperEclipse.jar" -lib "C:\Program Files
(x86)\Oxygen XML Editor 13\lib\resolver.jar" -lib "C:\Program Files
(x86)\Oxygen XML Editor 13\lib\xercesImpl.jar" -lib "C:\Program Files
(x86)\Oxygen XML Editor 13\lib\saxon.jar" -lib "C:\Program Files
(x86)\Oxygen XML Editor 13\lib\xml-apis-xpath.jar" -lib "C:\Program
Files (x86)\Oxygen XML Editor 13\lib\xml-apis-ext.jar" -lib
"C:\Program Files (x86)\Oxygen XML Editor 13\lib\log4j.jar" -f
"C:\Program Files (x86)\Oxygen XML Editor
13\frameworks/docbook/xsl/epub/bin/build.xml"
"-Dchunker.output.encoding=UTF-8" "-DoutputFile=I:\My Documents\My
Dropbox\xml\oxygen-mytest/out/dummy.epub" "-DxmlFile=I:\My
Documents\My Dropbox\xml\oxygen-mytest\dummy.xml"
"-Dprofile.arch=howdy2" "-Drjxsl=I:\My Documents\My
Dropbox\xml\oxygen-mytest/oxygen-test.xsl"

**************************(From Robert: I:\My Documents\My
Dropbox\xml\oxygen-mytest/oxygen-test.xsl" is the right path for this
file).

Buildfile: C:\Program Files (x86)\Oxygen XML Editor
13\frameworks\docbook\xsl\epub\bin\build.xml

dist:
   [delete] Deleting directory I:\My Documents\My Dropbox\xml\oxygen-mytest\out
    [mkdir] Created dir: I:\My Documents\My Dropbox\xml\oxygen-mytest\out
     [copy] Copying 1 file to I:\My Documents\My Dropbox\xml\oxygen-mytest\out
     [xslt] Processing I:\My Documents\My
Dropbox\xml\oxygen-mytest\dummy.xml to I:\My Documents\My
Dropbox\xml\oxygen-mytest\out\xincluded-profiled.xml
     [xslt] Loading stylesheet C:\Program Files (x86)\Oxygen XML
Editor 13\frameworks\docbook\xsl\profiling\profile.xsl
     [xslt] Processing I:\My Documents\My
Dropbox\xml\oxygen-mytest\out\xincluded-profiled.xml to I:\My
Documents\My Dropbox\xml\oxygen-mytest\out\dummy.xml
     [xslt] Loading stylesheet C:\Program Files (x86)\Oxygen XML
Editor 13\frameworks\docbook\xsl\epub\docbook.xsl
     [xslt] Writing I:\My Documents\My
Dropbox\xml\oxygen-mytest\out/bk01-toc.html for book
     [xslt] Writing I:\My Documents\My
Dropbox\xml\oxygen-mytest\out/ch01.html for chapter
     [xslt] Writing I:\My Documents\My
Dropbox\xml\oxygen-mytest\out/ch02.html for chapter
     [xslt] Writing I:\My Documents\My
Dropbox\xml\oxygen-mytest\out/ch03.html for chapter
     [xslt] Writing I:\My Documents\My
Dropbox\xml\oxygen-mytest\out/ch04.html for chapter(test-blockquote)
     [xslt] Writing I:\My Documents\My
Dropbox\xml\oxygen-mytest\out/pt01.html for part
     [xslt] Writing I:\My Documents\My
Dropbox\xml\oxygen-mytest\out/index.html for book
     [xslt] Writing I:\My Documents\My Dropbox\xml\oxygen-mytest\out/toc.ncx
     [xslt] Writing I:\My Documents\My Dropbox\xml\oxygen-mytest\out/content.opf
     [xslt] Writing I:\My Documents\My
Dropbox\xml\oxygen-mytest\out/META-INF/container.xml
   [delete] Deleting: I:\My Documents\My Dropbox\xml\oxygen-mytest\out\dummy.xml
   [delete] Deleting: I:\My Documents\My
Dropbox\xml\oxygen-mytest\out\xincluded-profiled.xml
     [xslt] Processing I:\My Documents\My
Dropbox\xml\oxygen-mytest\out\content.opf to I:\My Documents\My
Dropbox\xml\oxygen-mytest\temp\content.opf
     [xslt] Loading stylesheet C:\Program Files (x86)\Oxygen XML
Editor 13\frameworks\docbook\xsl\epub\removeImagesContentOpf.xsl
     [copy] Copying 1 file to I:\My Documents\My Dropbox\xml\oxygen-mytest\out

images:
     [xslt] Processing I:\My Documents\My
Dropbox\xml\oxygen-mytest\out\bk01-toc.html to I:\My Documents\My
Dropbox\xml\oxygen-mytest\temp\bk01-toc.html
     [xslt] Loading stylesheet C:\Program Files (x86)\Oxygen XML
Editor 13\frameworks\docbook\xsl\epub\images.xsl
     [xslt] Processing I:\My Documents\My
Dropbox\xml\oxygen-mytest\out\content.opf to I:\My Documents\My
Dropbox\xml\oxygen-mytest\temp\content.opf
     [xslt] Loading stylesheet C:\Program Files (x86)\Oxygen XML
Editor 13\frameworks\docbook\xsl\epub\addImagesContentOpf.xsl
     [copy] Copying 1 file to I:\My Documents\My Dropbox\xml\oxygen-mytest\out

images:
     [xslt] Processing I:\My Documents\My
Dropbox\xml\oxygen-mytest\out\ch01.html to I:\My Documents\My
Dropbox\xml\oxygen-mytest\temp\ch01.html
     [xslt] Loading stylesheet C:\Program Files (x86)\Oxygen XML
Editor 13\frameworks\docbook\xsl\epub\images.xsl
     [xslt] Processing I:\My Documents\My
Dropbox\xml\oxygen-mytest\out\content.opf to I:\My Documents\My
Dropbox\xml\oxygen-mytest\temp\content.opf
     [xslt] Loading stylesheet C:\Program Files (x86)\Oxygen XML
Editor 13\frameworks\docbook\xsl\epub\addImagesContentOpf.xsl
     [copy] Copying 1 file to I:\My Documents\My Dropbox\xml\oxygen-mytest\out

images:
     [xslt] Processing I:\My Documents\My
Dropbox\xml\oxygen-mytest\out\ch02.html to I:\My Documents\My
Dropbox\xml\oxygen-mytest\temp\ch02.html
     [xslt] Loading stylesheet C:\Program Files (x86)\Oxygen XML
Editor 13\frameworks\docbook\xsl\epub\images.xsl
     [xslt] Processing I:\My Documents\My
Dropbox\xml\oxygen-mytest\out\content.opf to I:\My Documents\My
Dropbox\xml\oxygen-mytest\temp\content.opf
     [xslt] Loading stylesheet C:\Program Files (x86)\Oxygen XML
Editor 13\frameworks\docbook\xsl\epub\addImagesContentOpf.xsl
     [copy] Copying 1 file to I:\My Documents\My Dropbox\xml\oxygen-mytest\out

images:
     [xslt] Processing I:\My Documents\My
Dropbox\xml\oxygen-mytest\out\ch03.html to I:\My Documents\My
Dropbox\xml\oxygen-mytest\temp\ch03.html
     [xslt] Loading stylesheet C:\Program Files (x86)\Oxygen XML
Editor 13\frameworks\docbook\xsl\epub\images.xsl
     [xslt] File I:\My Documents\My
Dropbox\xml\oxygen-mytest\images-kindle\small-small.jpg was copied to
I:\My Documents\My
Dropbox\xml\oxygen-mytest\out\images-kindle\small-small.jpg
     [xslt] Processing I:\My Documents\My
Dropbox\xml\oxygen-mytest\out\content.opf to I:\My Documents\My
Dropbox\xml\oxygen-mytest\temp\content.opf
     [xslt] Loading stylesheet C:\Program Files (x86)\Oxygen XML
Editor 13\frameworks\docbook\xsl\epub\addImagesContentOpf.xsl
     [copy] Copying 1 file to I:\My Documents\My Dropbox\xml\oxygen-mytest\out

images:
     [xslt] Processing I:\My Documents\My
Dropbox\xml\oxygen-mytest\out\ch04.html to I:\My Documents\My
Dropbox\xml\oxygen-mytest\temp\ch04.html
     [xslt] Loading stylesheet C:\Program Files (x86)\Oxygen XML
Editor 13\frameworks\docbook\xsl\epub\images.xsl
     [xslt] File I:\My Documents\My
Dropbox\xml\oxygen-mytest\images-kindle\wide-kindle.jpg was copied to
I:\My Documents\My
Dropbox\xml\oxygen-mytest\out\images-kindle\wide-kindle.jpg
     [xslt] Processing I:\My Documents\My
Dropbox\xml\oxygen-mytest\out\content.opf to I:\My Documents\My
Dropbox\xml\oxygen-mytest\temp\content.opf
     [xslt] Loading stylesheet C:\Program Files (x86)\Oxygen XML
Editor 13\frameworks\docbook\xsl\epub\addImagesContentOpf.xsl
     [copy] Copying 1 file to I:\My Documents\My Dropbox\xml\oxygen-mytest\out

images:
     [xslt] Processing I:\My Documents\My
Dropbox\xml\oxygen-mytest\out\index.html to I:\My Documents\My
Dropbox\xml\oxygen-mytest\temp\index.html
     [xslt] Loading stylesheet C:\Program Files (x86)\Oxygen XML
Editor 13\frameworks\docbook\xsl\epub\images.xsl
     [xslt] Processing I:\My Documents\My
Dropbox\xml\oxygen-mytest\out\content.opf to I:\My Documents\My
Dropbox\xml\oxygen-mytest\temp\content.opf
     [xslt] Loading stylesheet C:\Program Files (x86)\Oxygen XML
Editor 13\frameworks\docbook\xsl\epub\addImagesContentOpf.xsl
     [copy] Copying 1 file to I:\My Documents\My Dropbox\xml\oxygen-mytest\out

images:
     [xslt] Processing I:\My Documents\My
Dropbox\xml\oxygen-mytest\out\pt01.html to I:\My Documents\My
Dropbox\xml\oxygen-mytest\temp\pt01.html
     [xslt] Loading stylesheet C:\Program Files (x86)\Oxygen XML
Editor 13\frameworks\docbook\xsl\epub\images.xsl
     [xslt] Processing I:\My Documents\My
Dropbox\xml\oxygen-mytest\out\content.opf to I:\My Documents\My
Dropbox\xml\oxygen-mytest\temp\content.opf
     [xslt] Loading stylesheet C:\Program Files (x86)\Oxygen XML
Editor 13\frameworks\docbook\xsl\epub\addImagesContentOpf.xsl
     [copy] Copying 1 file to I:\My Documents\My Dropbox\xml\oxygen-mytest\out
     [copy] Copying 7 files to I:\My Documents\My Dropbox\xml\oxygen-mytest\out
   [delete] Deleting directory I:\My Documents\My Dropbox\xml\oxygen-mytest\temp
     [xslt] Processing I:\My Documents\My
Dropbox\xml\oxygen-mytest\out\toc.ncx to I:\My Documents\My
Dropbox\xml\oxygen-mytest\temp\toc.ncx
     [xslt] Loading stylesheet C:\Program Files (x86)\Oxygen XML
Editor 13\frameworks\docbook\xsl\epub\copy.xsl
     [copy] Copying 1 file to I:\My Documents\My Dropbox\xml\oxygen-mytest\out
     [xslt] Processing I:\My Documents\My
Dropbox\xml\oxygen-mytest\out\META-INF\container.xml to I:\My
Documents\My Dropbox\xml\oxygen-mytest\temp\container.xml
     [xslt] Loading stylesheet C:\Program Files (x86)\Oxygen XML
Editor 13\frameworks\docbook\xsl\epub\copy.xsl
     [copy] Copying 1 file to I:\My Documents\My
Dropbox\xml\oxygen-mytest\out\META-INF
      [zip] Building zip: I:\My Documents\My
Dropbox\xml\oxygen-mytest\out\dummy.epub
      [zip] Updating zip: I:\My Documents\My
Dropbox\xml\oxygen-mytest\out\dummy.epub

BUILD SUCCESSFUL
Total time: 4 seconds

The process finished with exit code: 0



-- 
Robert Nagle
6121 Winsome Ln #56C, Houston TX 77057-5581
(H) 713 893 3424/ (W) 832-251-7522 Carbon Neutral Since Jan 2010
http://www.robertnagle.info


More information about the oXygen-user mailing list