Thank you for your decent bug report. This is indeed a bug, but which
has been fixed in v2.3.1 (November 5, 2012).
Excerpts from http://www.xmlmind.com/ditac/changes.html#v2.3.1
---
When a bookmap contained a figurelist (or a tablelist) and the document
being converted contained no figures (or no tables), the conversion to
PDF using FOP failed with a org.apache.fop.fo.ValidationException:
"fo:list-block" is missing child elements. Required content model:
marker* (list-item)+.
---
You are using v2.0.4 (July 22, 2011). I strongly recommend that you
upgrade to latest version.
However if, for an unknown reason, you cannot upgrade, this bug is very
easy to fix by modifying your old copy of
DITAC_INSTALL_DIR/xsl/fo/ditac_figureList.xsl
Basically you should replace something like:
---
<fo:list-block xsl:use-attribute-sets="booklist">
<xsl:apply-templates
select="$ditacLists/ditac:figureList/ditac:figure"/>
</fo:list-block>
---
by something like:
---
<xsl:variable name="items"
select="$ditacLists/ditac:figureList/ditac:figure"/>
<xsl:if test="exists($items)">
<fo:list-block xsl:use-attribute-sets="booklist">
<xsl:apply-templates select="$items"/>
</fo:list-block>
</xsl:if>
---
Notice the <xsl:if test="exists($items)"></xsl:if> block.
This kind of change must be done in 3 places: for figures, tables and
examples.
Of course, if you cannot program XSLT 2.0, please don't do it! Instead
please try to upgrade to latest version of ditac.
On 08/29/2014 09:21 AM, Alberto Perri wrote:
*A description of the problem.*
i have a list of dita files under an item directory i select from
to make up a ditamap. If the dita files that make up the ditamap do
not contain any images
the following commands for the embedded DITAC
String[] args = { "-vvv",
"-t", xslDirURL.toExternalForm() +
"fo/customize/custom_fo.xsl",
"-frontmatter", "toc,figurelist+tablelist",
"-p", "title-page", xslDirURL.toExternalForm()
+ "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() };
will produce the error highlighted in blue the DITAC log show below
------------------------------------------------------------------------
Loading
"C:\HelinksTask2\Väsby\Report\items\customizedVäsby.ditamap"...
Loading the key definitions contained in
"C:\HelinksTask2\Väsby\Report\items\customizedVäsby.ditamap"...
Loading
"C:\HelinksTask2\Väsby\Report\items\customizedVäsby.ditamap"...
Simplifying main topic map
"C:\HelinksTask2\Väsby\Report\items\customizedVäsby.ditamap"...
Pushing content into the topic maps...
Pulling content into the topic maps...
Iteration #0.
All documents have been processed after 1 iterations (8ms).
Cascading attributes and metadata in the topic maps...
Including referenced maps into the main topic map...
Iteration #0.
All documents have been processed after 1 iterations (0ms).
Iteration #0.
All keys have been collected after 1 iterations (0ms).
Simplifying main topic map
"C:\HelinksTask2\Väsby\Report\items\customizedVäsby.ditamap"...
Pushing content into the topic maps...
Pulling content into the topic maps...
Iteration #0.
All documents have been processed after 1 iterations (0ms).
Cascading attributes and metadata in the topic maps...
Including referenced maps into the main topic map...
Iteration #0.
All documents have been processed after 1 iterations (0ms).
Loading
"C:\HelinksTask2\Väsby\Report\items\scd_history_details.dita"...
Processing inclusions in the topics...
Pushing content into the topics...
Pulling content into the topics...
Iteration #0.
All documents have been processed after 1 iterations (0ms).
Processing related links in the topics...
Filtering the topic map...
Adding attributes and metadata to the topics...
Creating title-only topics...
Adding related links to the topics...
Adding frontmatter and/or backmatter to the topic map...
Determining which files are to contain the topics...
Processing IDs and links...
Saving information about preprocessed files to
"C:\HelinksTask2\Väsby\Report\pdf\ditac_lists.ditac_lists"...
Saving preprocessed file
"C:\HelinksTask2\Väsby\Report\pdf\customizedVäsby.ditac"...
Transforming
"C:\HelinksTask2\Väsby\Report\pdf\customizedVäsby.ditac" to
"C:\HelinksTask2\Väsby\Report\pdf\customizedVäsby.fo" using
C:\helinksTemp\helinks\workspaces\r2be\com.helinks.sts.ditac\xsl\fo\customize\custom_fo.xsl...
caching style sheet
"file:/C:/helinksTemp/helinks/workspaces/r2be/com.helinks.sts.ditac/xsl/fo/customize/custom_fo.xsl"
Converting "C:\HelinksTask2\Väsby\Report\pdf\customizedVäsby.fo"
to "C:\HelinksTask2\Väsby\Report\pdf\customizedVäsby.pdf" using
FOP...
FOP[pdf]: executing command
""C:\helinksTemp\helinks\workspaces\r2be\com.helinks.sts.ditac\fop\fop"
-q -r -fo "C:\HelinksTask2\Väsby\Report\pdf\customizedVäsby.fo"
-pdf "C:\HelinksTask2\Väsby\Report\pdf\customizedVäsby.pdf""...
29-ago-2014 8.34.34 org.apache.fop.cli.Main startFOP
*GRAVE: Exception**
**javax.xml.transform.TransformerException:
org.apache.fop.fo.ValidationException: "fo:list-block" is
missing child elements. Required content model: marker*
(list-item)+ (See position 34:6730)**
** at
org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:302)**
** at
org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:130)**
** at org.apache.fop.cli.Main.startFOP(Main.java:174)**
** at org.apache.fop.cli.Main.main(Main.java:205)**
**Caused by: javax.xml.transform.TransformerException:
org.apache.fop.fo.ValidationException: "fo:list-block" is
missing child elements. Required content model: marker*
(list-item)+ (See position 34:6730)**
** at
org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:501)**
** at
org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:299)**
** ... 3 more**
**Caused by: org.apache.fop.fo.ValidationException:
"fo:list-block" is missing child elements. Required content
model: marker* (list-item)+ (See position 34:6730)*
at
org.apache.fop.events.ValidationExceptionFactory.createException(ValidationExceptionFactory.java:38)
at
org.apache.fop.events.EventExceptionManager.throwException(EventExceptionManager.java:54)
at
org.apache.fop.events.DefaultEventBroadcaster$1.invoke(DefaultEventBroadcaster.java:175)
at com.sun.proxy.$Proxy1.missingChildElement(Unknown Source)
at
org.apache.fop.fo.FONode.missingChildElementError(FONode.java:549)
at
org.apache.fop.fo.flow.ListBlock.endOfNode(ListBlock.java:102)
at
org.apache.fop.fo.FOTreeBuilder$MainFOHandler.endElement(FOTreeBuilder.java:349)
at
org.apache.fop.fo.FOTreeBuilder.endElement(FOTreeBuilder.java:177)
at
org.apache.xalan.transformer.TransformerIdentityImpl.endElement(TransformerIdentityImpl.java:1101)
at
org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown
Source)
at
org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unknown
Source)
at
org.apache.xerces.xinclude.XIncludeHandler.emptyElement(Unknown
Source)
at
org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown
Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
Source)
at
org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at
org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at
org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at
org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown
Source)
at
org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:484)
... 4 more
---------
javax.xml.transform.TransformerException:
org.apache.fop.fo.ValidationException: "fo:list-block" is
missing child elements. Required content model: marker*
(list-item)+ (See position 34:6730)
at
org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:501)
at
org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:299)
at
org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:130)
at org.apache.fop.cli.Main.startFOP(Main.java:174)
at org.apache.fop.cli.Main.main(Main.java:205)
Caused by: org.apache.fop.fo.ValidationException:
"fo:list-block" is missing child elements. Required content
model: marker* (list-item)+ (See position 34:6730)
at
org.apache.fop.events.ValidationExceptionFactory.createException(ValidationExceptionFactory.java:38)
at
org.apache.fop.events.EventExceptionManager.throwException(EventExceptionManager.java:54)
at
org.apache.fop.events.DefaultEventBroadcaster$1.invoke(DefaultEventBroadcaster.java:175)
at com.sun.proxy.$Proxy1.missingChildElement(Unknown Source)
at
org.apache.fop.fo.FONode.missingChildElementError(FONode.java:549)
at
org.apache.fop.fo.flow.ListBlock.endOfNode(ListBlock.java:102)
at
org.apache.fop.fo.FOTreeBuilder$MainFOHandler.endElement(FOTreeBuilder.java:349)
at
org.apache.fop.fo.FOTreeBuilder.endElement(FOTreeBuilder.java:177)
at
org.apache.xalan.transformer.TransformerIdentityImpl.endElement(TransformerIdentityImpl.java:1101)
at
org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown
Source)
at
org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unknown
Source)
at
org.apache.xerces.xinclude.XIncludeHandler.emptyElement(Unknown
Source)
at
org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown
Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
Source)
at
org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at
org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at
org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at
org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown
Source)
at
org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:484)
... 4 more
---------
org.apache.fop.fo.ValidationException: "fo:list-block" is
missing child elements. Required content model: marker*
(list-item)+ (See position 34:6730)
at
org.apache.fop.events.ValidationExceptionFactory.createException(ValidationExceptionFactory.java:38)
at
org.apache.fop.events.EventExceptionManager.throwException(EventExceptionManager.java:54)
at
org.apache.fop.events.DefaultEventBroadcaster$1.invoke(DefaultEventBroadcaster.java:175)
at com.sun.proxy.$Proxy1.missingChildElement(Unknown Source)
at
org.apache.fop.fo.FONode.missingChildElementError(FONode.java:549)
at
org.apache.fop.fo.flow.ListBlock.endOfNode(ListBlock.java:102)
at
org.apache.fop.fo.FOTreeBuilder$MainFOHandler.endElement(FOTreeBuilder.java:349)
at
org.apache.fop.fo.FOTreeBuilder.endElement(FOTreeBuilder.java:177)
at
org.apache.xalan.transformer.TransformerIdentityImpl.endElement(TransformerIdentityImpl.java:1101)
at
org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown
Source)
at
org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unknown
Source)
at
org.apache.xerces.xinclude.XIncludeHandler.emptyElement(Unknown
Source)
at
org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown
Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
Source)
at
org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at
org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at
org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at
org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown
Source)
at
org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:484)
at
org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:299)
at
org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:130)
at org.apache.fop.cli.Main.startFOP(Main.java:174)
at org.apache.fop.cli.Main.main(Main.java:205)
Deleting "C:\HelinksTask2\Väsby\Report\pdf\customizedVäsby.fo"...
Deleting
"C:\HelinksTask2\Väsby\Report\pdf\ditac_lists.ditac_lists"...
cannot delete file
"C:\HelinksTask2\Väsby\Report\pdf\ditac_lists.ditac_lists"
Deleting "C:\HelinksTask2\Väsby\Report\pdf\customizedVäsby.ditac"...
------------------------------------------------------------------------
If i run the same ditamap using XMLmind XSL Utility with these
options set
The error does not occur.
I would like to configure the embedded DITAC so that it behaves the
same way. I would like to do this because i do not know in advance
if a ditamap is referencing a dita file which may or may not contain
an image to adjust the DITAC commands like so
* for when there is no image/figure
o "-frontmatter", "toc,tablelist",
* for when there is an image/figure
o "-frontmatter", "toc,figurelist+tablelist",
*The version of XMLmind DITA Converter (ditac for short). Execute "ditac **
**-version" to display this version. **
***
INFO: ditac version is 2.0.4
*The name and version of the operating system used to run ditac. **
***
Windows 7 Professional 64 bit
System 64 bit Processor Intel(R) Core (TM)2 Duo CPU P8400 @ 2.26GHz
Ram 4,00GB
*The version of the JavaTM runtime used to run ditac. Execute "java **
**-version" to display this version.**
***
java version "1.6.0_45"
*If relevant, the ditac command-line used to convert your DITA document. **
***
String[] args = { "-vvv",
"-t", xslDirURL.toExternalForm() +
"fo/customize/custom_fo.xsl",
"-frontmatter", "toc,figurelist+tablelist",
"-p", "title-page", xslDirURL.toExternalForm() +
"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 relevant (which is almost always the case), a copy of your DITA **
**document or a mock-up document allowing to reproduce the problem.**
***
see attachements
* customizedVäsby1.ditamap
* customizedVäsby2.ditamap
* items.rar
*If relevant, a link the part of the DITA 1.2 specification which is **
**not correctly implemented by ditac.**
***
not applicable.
--
XMLmind DITA Converter Support List
[email protected]
http://www.xmlmind.com/mailman/listinfo/ditac-support