14.1 not picking up XSL file

Questions about XML that are not covered by the other forums should go here.
dcdenison
Posts: 31

14.1 not picking up XSL file

Wed Nov 21, 2012 11:36 pm

Still making the transition from 13.2 to 14.1...

The ePubs I'm generating in 14.1, using the ANT transformation, aren't picking up the customizations that I have in the XSL file.

It's picking up the .css file, but the customizations that are showing up in 13.2 aren't showing up in the 14.1 version.

Any ideas?

DC
adrian
Posts: 2389

Re: 14.1 not picking up XSL file

Thu Nov 22, 2012 6:27 pm

Hello,

Please mention the full context of the problem or at least a link to a previous conversation if this is a followup. I'm guessing this is a followup of: transforming docbook to epub using custom transformation scenerio

My colleague asked you there where did you add your custom .xsl to the DocBook EPUB scenario? Did you modify the bin/build.xml file from the directory frameworks/docbook/xsl/epub? What are your modifications in v13.2?

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
dcdenison
Posts: 31

Re: 14.1 not picking up XSL file

Fri Nov 23, 2012 11:50 pm

Yes, this is a followup to that discussion.

Sorry, I'll be sure to keep things in the same discussion.

I put the custom xsl in oxygenauthor>frameworks>docbook>xsl>epub>dcdenison.xsl

It's the exact same file in the same place in my 13.2 version and the 14.1 version.

I didn't modify the bin/build.xml file

The DocBook Epub ANT transformation options/paramenters/output are the same in 13.2 and 14.1

The heads of the two epubs generated contain different meta data:

13.2

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

14.1

<meta name="generator" content="DocBook XSL Stylesheets V1.77.1"/>

Could that be the difference?

Thanks, really appreciate the help.

DC
adrian
Posts: 2389

Re: 14.1 not picking up XSL file

Mon Nov 26, 2012 6:10 pm

So where is the custom xsl from oxygenauthor/frameworks/docbook/xsl/epub/dcdenison.xsl being used/imported in v13.2? If you don't remember, search for the string "dcdenison.xsl" (you can use the Find/Replace in Files dialog from Oxygen) in the oxygenauthor/frameworks/docbook folder from v13.2. Search in all files (File filter: *.*), just to make sure.

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
dcdenison
Posts: 31

Re: 14.1 not picking up XSL file

Mon Nov 26, 2012 7:28 pm

Here it is in the header of the document:

<?xml version="1.0" encoding="UTF-8"?>
<?oxygen RNGSchema="http://www.oasis-open.org/docbook/xml/5.0/rng/docbookxi.rng" type="xml"?>
<?xml-stylesheet type="text/xsl" href="dcdenison.xsl"?>
<book xmlns="http://docbook.org/ns/docbook" xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:xlink="http://www.w3.org/1999/xlink" version="5.0">
<info>

Here it is in the ANT transformation:

Executing:
"/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin/java" -Xmx256m -classpath "/Applications/oxygenAuthor/tools/ant/lib/ant-launcher.jar" "-Dant.home=/Applications/oxygenAuthor/tools/ant" org.apache.tools.ant.launch.Launcher -lib "/Applications/oxygenAuthor/classes" -lib "/Applications/oxygenAuthor/lib/oxygen.jar" -lib "/Applications/oxygenAuthor/lib/oxygenAuthor.jar" -lib "/Applications/oxygenAuthor/lib/oxygenDeveloper.jar" -lib "/Applications/oxygenAuthor/lib/oxygenEclipse.jar" -lib "/Applications/oxygenAuthor/lib/oxygenAuthorEclipse.jar" -lib "/Applications/oxygenAuthor/lib/oxygenDeveloperEclipse.jar" -lib "/Applications/oxygenAuthor/lib/resolver.jar" -lib "/Applications/oxygenAuthor/lib/xercesImpl.jar" -lib "/Applications/oxygenAuthor/lib/saxon.jar" -lib "/Applications/oxygenAuthor/lib/xml-apis-xpath.jar" -lib "/Applications/oxygenAuthor/lib/xml-apis-ext.jar" -lib "/Applications/oxygenAuthor/lib/log4j.jar" -f "/Applications/oxygenAuthor/frameworks/docbook/xsl/epub/bin/build.xml" "-Dhtml.stylesheet=/Applications/oxygenAuthor/frameworks/docbook/css/styles.css" "-Dchunker.output.encoding=UTF-8" "-DoutputFile=/Users/dcdenison/Desktop/MARCH 18/EBOOK_PUBLISHERS_TO_WATCH/out/ebookpublisherstowatch-2013-13-2.epub" "-DxmlFile=/Users/dcdenison/Desktop/MARCH 18/EBOOK_PUBLISHERS_TO_WATCH/ebookpublisherstowatch-2013-13-2.xml"

Buildfile: /Applications/oxygenAuthor/frameworks/docbook/xsl/epub/bin/build.xml

dist:
 [delete] Deleting directory /Users/dcdenison/Desktop/MARCH 18/EBOOK_PUBLISHERS_TO_WATCH/out
 [mkdir] Created dir: /Users/dcdenison/Desktop/MARCH 18/EBOOK_PUBLISHERS_TO_WATCH/out
 [copy] Copying 1 file to /Users/dcdenison/Desktop/MARCH 18/EBOOK_PUBLISHERS_TO_WATCH/out
 [xslt] Processing /Users/dcdenison/Desktop/MARCH 18/EBOOK_PUBLISHERS_TO_WATCH/ebookpublisherstowatch-2013-13-2.xml to /Users/dcdenison/Desktop/MARCH 18/EBOOK_PUBLISHERS_TO_WATCH/out/xincluded-profiled.xml
 [xslt] Loading stylesheet /Applications/oxygenAuthor/frameworks/docbook/xsl/profiling/profile.xsl
 [xslt] Processing /Users/dcdenison/Desktop/MARCH 18/EBOOK_PUBLISHERS_TO_WATCH/out/xincluded-profiled.xml to /Users/dcdenison/Desktop/MARCH 18/EBOOK_PUBLISHERS_TO_WATCH/out/dummy.xml
 [xslt] Loading stylesheet /Applications/oxygenAuthor/frameworks/docbook/xsl/epub/dcdenison.xsl
 [xslt] No template for "/book/info/title" (or any of its leaves) exists in the context named "title" in the "en" localization.
 [xslt] Writing /Users/dcdenison/Desktop/MARCH 18/EBOOK_PUBLISHERS_TO_WATCH/out/bk01-toc.html for book
 [xslt] Writing /Users/dcdenison/Desktop/MARCH 18/EBOOK_PUBLISHERS_TO_WATCH/out/pr01.html for preface
 [xslt] Writing /Users/dcdenison/Desktop/MARCH 18/EBOOK_PUBLISHERS_TO_WATCH/out/ch01.html for chapter
 [xslt] Writing /Users/dcdenison/Desk
dcdenison
Posts: 31

Re: 14.1 not picking up XSL file

Tue Nov 27, 2012 6:06 pm

Any ideas based on that xsl data? I'm eager to make the move to 14.1. :)
adrian
Posts: 2389

Re: 14.1 not picking up XSL file

Tue Nov 27, 2012 6:36 pm

Hi,

The stylesheet associated in the header of the XML document is irrelevant for the Docbook to EPUB ANT transformation scenario (only XSLT scenarios use that).
My guess is you have modified "bin/build.xml" and that's why "docbook/xsl/epub/dcdenison.xsl
" is applied during the transformation:

Code: Select all

[xslt] Loading stylesheet /Applications/oxygenAuthor/frameworks/docbook/xsl/epub/dcdenison.xsl


If you don't remember what you changed in v13.2 when you made the customization, I recommend downloading a fresh copy of Oxygen XML Author 13.2 from our software archive and using the Diff Dirs (Compare Directories) tool from Oxygen to compare the folder "frameworks/docbook" from the fresh copy of v13.2 with the one from your current copy of v13.2. This should help you see what you changed there, so you can do the same in v14.1.

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
dcdenison
Posts: 31

Re: 14.1 not picking up XSL file

Tue Nov 27, 2012 6:45 pm

can you recommend any consultants who could help me with this?
dcdenison
Posts: 31

Re: 14.1 not picking up XSL file

Tue Nov 27, 2012 7:55 pm

here are the two bin/build.xml files.

btw, both files give me multiple "E [Xerces] Attribute "expression" must be declared for element type "param"." errors.


13.2

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<project basedir="." default="dist" name="ANTProject">
  <!--
    Convert DocBook documents into ePUB files.
   
    ePUBis defined by the IDPF at http://www.idpf.org and is made of 3 standards:
    - Open Publication Structure (OPS)
    - Open Packaging Format (OPF)
    - Open Container Format (OCF)
  -->
 
  <!-- Path to Docbook XML file. -->
  <property name="xmlFile" value=""/>
 
  <!-- Stylesheet for META-INF/container.xml, OPF and NCX output files. -->
  <property name="stylesheetFile" value="../dcdenison.xsl"/>
 
  <!-- Stylesheet to fix image src attribute in HTML files.  -->
  <property name="imagesStylesheetFile" value="../images.xsl"/>
 
  <!-- Stylesheet to add images in content.opf files. -->
  <property name="removeOldImagesStylesheetFile" value="../removeImagesContentOpf.xsl"/>
 
  <!-- Stylesheet to add images in content.opf files. -->
  <property name="addNewImagesStylesheetFile" value="../addImagesContentOpf.xsl"/>

  <!-- Stylesheet to remove any doctype from NCX and container files. -->
  <property name="copy" value="../copy.xsl"/>
 

  <!-- Path where the output ePUB file will be saved. -->
  <property name="outputFile" value=""/>
 
  <dirname property="xmlFileDir" file="${xmlFile}"/>
  <dirname property="outputDir" file="${outputFile}"/>
  <property name="metadir" value="${outputDir}/META-INF/"/>
  <property name="oebpsdir" value="${outputDir}/"/>
  <property name="outputTempDir" value="${outputDir}/../temp"/>
 
  <path id="classpath">
    <pathelement path="${java.class.path}"/>
  </path>
 
  <taskdef resource="net/sf/antcontrib/antcontrib.properties"/>
 
  <target name="dist">
    <!-- Recreate output directory -->
    <delete dir="${outputDir}"/>
    <mkdir dir="${outputDir}"/>
    <!-- Temporary files. -->
    <property name="xincluded-profiled.xml" value="${outputDir}/xincluded-profiled.xml"/>
    <property name="dummy.xml" value="${outputDir}/dummy.xml"/>
    <!-- Copy the mime type file-->
    <copy file="mimetype" todir="${outputDir}" overwrite="true"/>
    <xslt in="${xmlFile}" out="${xincluded-profiled.xml}" style="../../profiling/profile.xsl"
      classpath="classpath">
      <!--OXYGEN PATCH for EXM-19733-->
      <xmlcatalog>
        <catalogpath>
          <pathelement location="../../../catalog.xml"/>
        </catalogpath>
      </xmlcatalog>
      <sysproperty key="org.apache.xerces.xni.parser.XMLParserConfiguration"
        value="org.apache.xerces.parsers.XIncludeParserConfiguration"/>
      <param name="profile.arch" expression="${profile.arch}" if="profile.arch"/>
      <param name="profile.audience" expression="${profile.audience}" if="profile.audience"/>
      <param name="profile.condition" expression="${profile.condition}" if="profile.condition"/>
      <param name="profile.conformance" expression="${profile.conformance}" if="profile.conformance"/>
      <param name="profile.lang" expression="${profile.lang}" if="profile.lang"/>
      <param name="profile.os" expression="${profile.os}" if="profile.os"/>
      <param name="profile.revision" expression="${profile.revision}" if="profile.revision"/>
      <param name="profile.revisionflag" expression="${profile.revisionflag}" if="profile.revisionflag"/>
      <param name="profile.role" expression="${profile.role}" if="profile.role"/>
      <param name="profile.security" expression="${profile.security}" if="profile.security"/>
      <param name="profile.status" expression="${profile.status}" if="profile.status"/>
      <param name="profile.userlevel" expression="${profile.userlevel}" if="profile.userlevel"/>
      <param name="profile.vendor" expression="${profile.vendor}" if="profile.vendor"/>
      <param name="profile.wordsize" expression="${profile.wordsize}" if="profile.wordsize"/>
      <param name="profile.attribute" expression="${profile.attribute}" if="profile.attribute"/>
      <param name="profile.value" expression="${profile.value}" if="profile.value"/>
    </xslt>
    <!-- The transformation for EPUB output. -->
    <xslt style="${stylesheetFile}" in="${xincluded-profiled.xml}" out="${dummy.xml}" classpath="classpath">
      <sysproperty key="org.apache.xerces.xni.parser.XMLParserConfiguration"
        value="org.apache.xerces.parsers.XIncludeParserConfiguration"/>
      <xmlcatalog>
        <catalogpath>
          <pathelement location="../../../catalog.xml"/>
        </catalogpath>
      </xmlcatalog>
      <param name="base.dir" expression="${oebpsdir}"/>
      <param name="epub.metainf.dir" expression="${metadir}"/>
      <param name="epub.oebps.dir" expression="${oebpsdir}"/>
      <param name="epub.opf.fileref" expression="content.opf"/>
      <param name="xml.dir" expression="${xmlFileDir}"/>
      <param name="chunker.output.encoding" expression="${chunker.output.encoding}" if="chunker.output.encoding"/>
      <param name="chunk.quietly" expression="${chunk.quietly}" if="chunk.quietly"/>
      <param name="inputDir" expression="${xmlFileDir}"/>
      <param name="outputDir" expression="${outputDir}"/>
      <param name="html.stylesheet" expression="${html.stylesheet}" if="html.stylesheet"/>
    </xslt>
    <!-- Remove the not necessary output files. -->
    <delete file="${dummy.xml}"/>
    <delete file="${xincluded-profiled.xml}"/>
   
    <mkdir dir="${outputTempDir}"/>
    <!-- Remove old images from content.opf. -->
    <xslt style="${removeOldImagesStylesheetFile}" in="${outputDir}/content.opf" out="${outputTempDir}/content.opf" classpath="classpath">
      <xmlcatalog>
        <catalogpath>
          <pathelement location="../../../../xhtml11/dtd/xhtmlcatalog.xml"/>
        </catalogpath>
      </xmlcatalog>
    </xslt>
    <copy file="${outputTempDir}/content.opf" tofile="${outputDir}/content.opf" overwrite="true"/>
    <!-- Add new images from content.opf. -->
    <foreach target="images" param="inputFile">
      <path>
        <fileset dir="${outputDir}">
          <include name="**/*.html"/>
        </fileset>
      </path>
    </foreach>
    <copy todir="${outputDir}" overwrite="true">
      <fileset dir="${outputTempDir}">
        <include name="**/*.html"/>
      </fileset>
    </copy>
    <delete dir="${outputTempDir}"/>
   
    <!-- Remove wrong DOCTYPE -->
    <xslt style="${copy}" in="${outputDir}/toc.ncx" out="${outputTempDir}/toc.ncx" classpath="classpath">
      <xmlcatalog>
        <catalogpath>
          <pathelement location="../../../../xhtml11/dtd/xhtmlcatalog.xml"/>
        </catalogpath>
      </xmlcatalog>
    </xslt>
    <copy file="${outputTempDir}/toc.ncx" tofile="${outputDir}/toc.ncx" overwrite="true"/>
    <!-- Remove wrong DOCTYPE -->
    <xslt style="${copy}" in="${outputDir}/META-INF/container.xml" out="${outputTempDir}/container.xml" classpath="classpath">
      <xmlcatalog>
        <catalogpath>
          <pathelement location="../../../../xhtml11/dtd/xhtmlcatalog.xml"/>
        </catalogpath>
      </xmlcatalog>
    </xslt>
    <copy file="${outputTempDir}/container.xml" tofile="${outputDir}/META-INF/container.xml" overwrite="true"/>

    <!-- ZIP the EPUB file, keep the mimetype uncompressed. -->
    <zip destfile="${outputFile}" basedir="${outputDir}" compress="true"
      includes="META-INF/container.xml,toc.ncx, content.opf,container.opf,
                 **/*.html,**/*.HTML,
                 **/*.css,**/*.CSS,
                 **/*.jpg,**/*.jpeg,**/*.gif,**/*.png,**/*.svg,**/*.JPG,**/*.JPEG,**/*.GIF,**/*.PNG,**/*.SVG,
                 **/*.mml, **/*.MML, **/*.mathml, **/*.MATHML"/>
    <zip destfile="${outputFile}" basedir="${outputDir}" includes="mimetype" update="true"
      keepcompression="true" compress="false"/>
  </target>
 
  <target name="images">
    <basename file="${inputFile}" property="fileName"/>
    <xslt style="${imagesStylesheetFile}" in="${inputFile}" out="${outputTempDir}/${fileName}" classpath="classpath">
      <xmlcatalog>
        <catalogpath>
          <pathelement location="../../../../xhtml11/dtd/xhtmlcatalog.xml"/>
        </catalogpath>
      </xmlcatalog>
      <param name="inputDir" expression="${xmlFileDir}"/>
      <param name="outputDir" expression="${outputDir}"/>
      <param name="imagesDir" expression="images"/>
    </xslt>
    <xslt style="${addNewImagesStylesheetFile}" in="${outputDir}/content.opf" out="${outputTempDir}/content.opf" classpath="classpath">
      <xmlcatalog>
        <catalogpath>
          <pathelement location="../../../../xhtml11/dtd/xhtmlcatalog.xml"/>
        </catalogpath>
      </xmlcatalog>
      <param name="inputFile" expression="${outputTempDir}/${fileName}"/>
    </xslt>
    <copy file="${outputTempDir}/content.opf" tofile="${outputDir}/content.opf" overwrite="true"/>
  </target>
</project>




14.1

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<project basedir="." default="dist" name="ANTProject">
  <!--
    Convert DocBook documents into ePUB files.
   
    ePUBis defined by the IDPF at http://www.idpf.org and is made of 3 standards:
    - Open Publication Structure (OPS)
    - Open Packaging Format (OPF)
    - Open Container Format (OCF)
  -->
  <!--Needed to create an unique name for the profiled XML file-->
  <tstamp/>
  <!-- Path to Docbook XML file. -->
  <property name="xmlFile" value=""/>
 
  <!-- Stylesheet for META-INF/container.xml, OPF and NCX output files. -->
  <property name="stylesheetFile" value="../docbook.xsl"/>
 
  <!-- Stylesheet to fix image src attribute in HTML files.  -->
  <property name="imagesStylesheetFile" value="../images.xsl"/>
 
  <!-- Stylesheet to add images in content.opf files. -->
  <property name="removeOldImagesStylesheetFile" value="../removeImagesContentOpf.xsl"/>
 
  <!-- Stylesheet to add images in content.opf files. -->
  <property name="addNewImagesStylesheetFile" value="../addImagesContentOpf.xsl"/>

  <!-- Stylesheet to remove any doctype from NCX and container files. -->
  <property name="copy" value="../copy.xsl"/>
 

  <!-- Path where the output ePUB file will be saved. -->
  <property name="outputFile" value=""/>
 
  <dirname property="xmlFileDir" file="${xmlFile}"/>
  <dirname property="outputDir" file="${outputFile}"/>
  <property name="metadir" value="${outputDir}/META-INF/"/>
  <property name="oebpsdir" value="${outputDir}/"/>
  <property name="outputTempDir" value="${outputDir}/../temp"/>
 
  <path id="classpath">
    <pathelement path="${java.class.path}"/>
  </path>
 
  <taskdef resource="net/sf/antcontrib/antcontrib.properties"/>
 
  <target name="dist">
    <!-- Recreate output directory -->
    <delete dir="${outputDir}"/>
    <mkdir dir="${outputDir}"/>
    <!-- Temporary files. -->
    <property name="xincluded-profiled.xml" value="${xmlFileDir}/xincluded-profiled${TSTAMP}.xml"/>
    <property name="dummy.xml" value="${outputDir}/dummy.xml"/>
    <!-- Copy the mime type file-->
    <copy file="mimetype" todir="${outputDir}" overwrite="true"/>
    <xslt in="${xmlFile}" out="${xincluded-profiled.xml}" style="../../profiling/profile.xsl"
      classpath="classpath">
      <!--OXYGEN PATCH for EXM-19733-->
      <xmlcatalog>
        <catalogpath>
          <pathelement location="../../../catalog.xml"/>
        </catalogpath>
      </xmlcatalog>
      <sysproperty key="org.apache.xerces.xni.parser.XMLParserConfiguration"
        value="org.apache.xerces.parsers.XIncludeParserConfiguration"/>
      <param name="profile.arch" expression="${profile.arch}" if="profile.arch"/>
      <param name="profile.audience" expression="${profile.audience}" if="profile.audience"/>
      <param name="profile.condition" expression="${profile.condition}" if="profile.condition"/>
      <param name="profile.conformance" expression="${profile.conformance}" if="profile.conformance"/>
      <param name="profile.lang" expression="${profile.lang}" if="profile.lang"/>
      <param name="profile.os" expression="${profile.os}" if="profile.os"/>
      <param name="profile.revision" expression="${profile.revision}" if="profile.revision"/>
      <param name="profile.revisionflag" expression="${profile.revisionflag}" if="profile.revisionflag"/>
      <param name="profile.role" expression="${profile.role}" if="profile.role"/>
      <param name="profile.security" expression="${profile.security}" if="profile.security"/>
      <param name="profile.status" expression="${profile.status}" if="profile.status"/>
      <param name="profile.userlevel" expression="${profile.userlevel}" if="profile.userlevel"/>
      <param name="profile.vendor" expression="${profile.vendor}" if="profile.vendor"/>
      <param name="profile.wordsize" expression="${profile.wordsize}" if="profile.wordsize"/>
      <param name="profile.attribute" expression="${profile.attribute}" if="profile.attribute"/>
      <param name="profile.value" expression="${profile.value}" if="profile.value"/>
    </xslt>
    <!-- The transformation for EPUB output. -->
    <xslt style="${stylesheetFile}" in="${xincluded-profiled.xml}" out="${dummy.xml}" classpath="classpath">
      <sysproperty key="org.apache.xerces.xni.parser.XMLParserConfiguration"
        value="org.apache.xerces.parsers.XIncludeParserConfiguration"/>
      <xmlcatalog>
        <catalogpath>
          <pathelement location="../../../catalog.xml"/>
        </catalogpath>
      </xmlcatalog>
      <param name="base.dir" expression="${oebpsdir}"/>
      <param name="epub.metainf.dir" expression="${metadir}"/>
      <param name="epub.oebps.dir" expression="${oebpsdir}"/>
      <param name="epub.opf.fileref" expression="content.opf"/>
      <param name="xml.dir" expression="${xmlFileDir}"/>
      <param name="chunker.output.encoding" expression="${chunker.output.encoding}" if="chunker.output.encoding"/>
      <param name="chunk.quietly" expression="${chunk.quietly}" if="chunk.quietly"/>
      <param name="inputDir" expression="${xmlFileDir}"/>
      <param name="outputDir" expression="${outputDir}"/>
      <param name="html.stylesheet" expression="${html.stylesheet}" if="html.stylesheet"/>
      <param name="keep.relative.image.uris" expression="0"/>
    </xslt>
    <!-- Remove the not necessary output files. -->
    <delete file="${dummy.xml}"/>
    <delete file="${xincluded-profiled.xml}"/>
   
    <mkdir dir="${outputTempDir}"/>
    <!-- Remove old images from content.opf. -->
    <xslt style="${removeOldImagesStylesheetFile}" in="${outputDir}/content.opf" out="${outputTempDir}/content.opf" classpath="classpath">
      <xmlcatalog>
        <catalogpath>
          <pathelement location="../../../../xhtml11/dtd/xhtmlcatalog.xml"/>
        </catalogpath>
      </xmlcatalog>
    </xslt>
    <copy file="${outputTempDir}/content.opf" tofile="${outputDir}/content.opf" overwrite="true"/>
    <!-- Add new images from content.opf. -->
    <foreach target="images" param="inputFile">
      <path>
        <fileset dir="${outputDir}">
          <include name="**/*.html"/>
        </fileset>
      </path>
    </foreach>
    <copy todir="${outputDir}" overwrite="true">
      <fileset dir="${outputTempDir}">
        <include name="**/*.html"/>
      </fileset>
    </copy>
    <delete dir="${outputTempDir}"/>
   
    <!-- Remove wrong DOCTYPE -->
    <xslt style="${copy}" in="${outputDir}/toc.ncx" out="${outputTempDir}/toc.ncx" classpath="classpath">
      <xmlcatalog>
        <catalogpath>
          <pathelement location="../../../../xhtml11/dtd/xhtmlcatalog.xml"/>
        </catalogpath>
      </xmlcatalog>
    </xslt>
    <copy file="${outputTempDir}/toc.ncx" tofile="${outputDir}/toc.ncx" overwrite="true"/>
    <!-- Remove wrong DOCTYPE -->
    <xslt style="${copy}" in="${outputDir}/META-INF/container.xml" out="${outputTempDir}/container.xml" classpath="classpath">
      <xmlcatalog>
        <catalogpath>
          <pathelement location="../../../../xhtml11/dtd/xhtmlcatalog.xml"/>
        </catalogpath>
      </xmlcatalog>
    </xslt>
    <copy file="${outputTempDir}/container.xml" tofile="${outputDir}/META-INF/container.xml" overwrite="true"/>

    <!-- ZIP the EPUB file, keep the mimetype uncompressed. -->
    <zip destfile="${outputFile}" basedir="${outputDir}" compress="true"
      includes="META-INF/container.xml,toc.ncx, content.opf,container.opf,
                 **/*.html,**/*.HTML,
                 **/*.css,**/*.CSS,
                 **/*.jpg,**/*.jpeg,**/*.gif,**/*.png,**/*.svg,**/*.JPG,**/*.JPEG,**/*.GIF,**/*.PNG,**/*.SVG,
                 **/*.mml, **/*.MML, **/*.mathml, **/*.MATHML"/>
    <zip destfile="${outputFile}" basedir="${outputDir}" includes="mimetype" update="true"
      keepcompression="true" compress="false"/>
  </target>
 
  <target name="images">
    <basename file="${inputFile}" property="fileName"/>
    <xslt style="${imagesStylesheetFile}" in="${inputFile}" out="${outputTempDir}/${fileName}" classpath="classpath">
      <xmlcatalog>
        <catalogpath>
          <pathelement location="../../../../xhtml11/dtd/xhtmlcatalog.xml"/>
        </catalogpath>
      </xmlcatalog>
      <param name="inputDir" expression="${xmlFileDir}"/>
      <param name="outputDir" expression="${outputDir}"/>
      <param name="imagesDir" expression="images"/>
    </xslt>
    <xslt style="${addNewImagesStylesheetFile}" in="${outputDir}/content.opf" out="${outputTempDir}/content.opf" classpath="classpath">
      <xmlcatalog>
        <catalogpath>
          <pathelement location="../../../../xhtml11/dtd/xhtmlcatalog.xml"/>
        </catalogpath>
      </xmlcatalog>
      <param name="inputFile" expression="${outputTempDir}/${fileName}"/>
    </xslt>
    <copy file="${outputTempDir}/content.opf" tofile="${outputDir}/content.opf" overwrite="true"/>
  </target>
</project>
dcdenison
Posts: 31

Re: 14.1 not picking up XSL file

Wed Nov 28, 2012 3:42 pm

Hi, does anything jump out at you in the comparison of those two files? Using the compare feature I could see that there were some differences, but I couldn't tell which ones were significant.

Also, any suggestions on consultants who could help me manage Oxygen Author?
adrian
Posts: 2389

Re: 14.1 not picking up XSL file

Wed Nov 28, 2012 4:07 pm

I've compared the two build.xml files with the Diff Files tool from Oxygen and the obvious change is the reference to your custom stylesheet.

At line 16 from your 13.2 build.xml file I see:
<property name="stylesheetFile" value="../dcdenison.xsl"/>

Make the same change (replace value="../docbook.xsl" with value="../dcdenison.xsl") in the 14.1 build.xml at line 17:
<property name="stylesheetFile" value="../docbook.xsl"/>

Make sure you've copied 'dcdenison.xsl' to frameworks/docbook/xsl/epub and you should be up and running.

For consultants check our Consulting Partners section from our website:
oXygen XML > Partners > Consulting Partners

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
dcdenison
Posts: 31

Re: 14.1 not picking up XSL file

Wed Nov 28, 2012 6:59 pm

Thank you! I think that does the trick.

On to 14.1!

DC

Return to “General XML Questions”

Who is online

Users browsing this forum: No registered users and 0 guests