Hi Hussein,
you might still remember me from all the questions i put forward to
you about two years ago.
I recently updated DITAC hosted in java from V2_0_1 to V2_5_1. I also
updated Apache FOP from version 1.0 to 1.1 but when i run the convertor
now i get the following error
fatal error reported by the XSLT engine: Cannot find a matching
2-argument function named
{java:com.xmlmind.ditac.xslt.Number}format(). Note that direct calls
to Java methods are not available under Saxon-HE; SystemID:
file:/C:/helinksTemp/helinks/gmf2-0M5/eclipse/plugins/com.helinks.sts.ditac_1.0.0/xsl/common/ditacUtil.xsl;
Line#: 389; Column#: 58
Could you explain to me what this error means so that i can fix it.
* If the error is related to column widths in tables, i specify column
widths in percentage values
* If the error is related to the fact that i had to change in order to
configure the converter this is what i did below
*converter.setStyleSheetDirectory(xslURL);*
to
*File xslDir = new File(xslPath);**
**System.setProperty("DITAC_XSL_DIR",
xslDir.getAbsolutePath());**
*
The configuration looks like this(it worked perfectly in the
older version)
String[] args = { "-vvv", "-xslt2", "pdf",
xslDir + "fo/customize/custom_fo.xsl",
"-frontmatter", "toc,figurelist+tablelist",
"-p", "title-page",
xslDir + "fo/customize/titlepage.fo", "-p",
"foProcessor", "FOP", "-p",
"screen-resolution", "96", "-p",
"default-table-width", "100%", "-p",
"title-after",
"fig table", "-p", "base-font-size", "8pt",
"-p", "number",
"all", "-p", "pdf-outline", "yes",
outFile.getPath(),
inFile.getPath() };
* If the error is related to my customized custom_fo.xsl here is what
it contains
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format"
version="2.0">
<!-- <xsl:import href="ditac-xsl:fo/fo.xsl"/> -->
<xsl:import href="../../fo/fo.xsl"/>
<!-- Topic formating -->
<xsl:attribute-set name="section1-title"
use-attribute-sets="topic-title">
<xsl:attribute name="break-before">page</xsl:attribute>
<xsl:attribute name="font-size">180%</xsl:attribute>
<xsl:attribute name="border-bottom">1.0pt solid
blue</xsl:attribute>
</xsl:attribute-set>
<xsl:attribute-set name="section2-title"
use-attribute-sets="topic-title">
<xsl:attribute
name="space-before.minimum">0.4pt</xsl:attribute>
<xsl:attribute
name="space-before.optimum">0.6pt</xsl:attribute>
<xsl:attribute
name="space-before.maximum">0.8pt</xsl:attribute>
<xsl:attribute
name="keep-together.within-page">always</xsl:attribute>
<xsl:attribute name="font-size">160%</xsl:attribute>
<xsl:attribute name="border-bottom">0.8pt solid
blue</xsl:attribute>
</xsl:attribute-set>
<xsl:attribute-set name="section3-title"
use-attribute-sets="topic-title">
<xsl:attribute
name="space-before.minimum">0.4pt</xsl:attribute>
<xsl:attribute
name="space-before.optimum">0.6pt</xsl:attribute>
<xsl:attribute
name="space-before.maximum">0.8pt</xsl:attribute>
<xsl:attribute
name="keep-together.within-page">always</xsl:attribute>
<xsl:attribute name="font-size">150%</xsl:attribute>
<xsl:attribute name="border-bottom">0.6pt solid
blue</xsl:attribute>
</xsl:attribute-set>
<xsl:attribute-set name="section4-title"
use-attribute-sets="topic-title">
<xsl:attribute
name="space-before.minimum">0.4pt</xsl:attribute>
<xsl:attribute
name="space-before.optimum">0.6pt</xsl:attribute>
<xsl:attribute
name="space-before.maximum">0.8pt</xsl:attribute>
<xsl:attribute
name="keep-together.within-page">always</xsl:attribute>
<xsl:attribute name="font-size">150%</xsl:attribute>
<xsl:attribute name="border-bottom">0.6pt solid
blue</xsl:attribute>
</xsl:attribute-set>
<!-- Titles -->
<xsl:attribute-set name="title"
use-attribute-sets="block-style">
<xsl:attribute
name="space-after.minimum">0.0pt</xsl:attribute>
<xsl:attribute
name="space-after.optimum">0.0pt</xsl:attribute>
<xsl:attribute
name="space-after.maximum">0.0pt</xsl:attribute>
</xsl:attribute-set>
<!-- Paragraphs -->
<xsl:attribute-set name="p" use-attribute-sets="block-style">
<xsl:attribute
name="space-before.minimum">0.0pt</xsl:attribute>
<xsl:attribute
name="space-before.optimum">0.0pt</xsl:attribute>
<xsl:attribute
name="space-before.maximum">0.0pt</xsl:attribute>
<xsl:attribute name="font-size">110%</xsl:attribute>
<!-- <xsl:attribute
name="text-indent">1em</xsl:attribute> -->
</xsl:attribute-set>
<!-- fig
============================================================== -->
<xsl:attribute-set name="fig"
use-attribute-sets="display-style">
<xsl:attribute
name="keep-together.within-page">always</xsl:attribute>
</xsl:attribute-set>
<!-- image
============================================================= -->
<xsl:attribute-set name="image-container">
<xsl:attribute
name="keep-together.within-page">always</xsl:attribute>
</xsl:attribute-set>
<!-- Align text in tables left -->
<xsl:template name="alignAttribute">
<xsl:if test="@align = 'left'">
<xsl:attribute name="text-align">
<xsl:choose>
<xsl:when test="@align = 'char'">
<xsl:choose>
<xsl:when test="@align/../@char">
<xsl:value-of select="@align/../@char"/>
</xsl:when>
<xsl:otherwise>.</xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="@align"/>
</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
</xsl:if>
</xsl:template>
</xsl:stylesheet>
Could you help me get this straight
Thanks in advance,
Alberto Perri