[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook-apps] <qandaset defaultlabel="none"> FOP error
Hi Eric,
Indeed, this is a bug in the template with match="question" in
fo/qandaset.xsl. I've fixed it in SVN for the next release, and you can
use this version in your customization layer:
<xsl:template match="question">
<xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable> <xsl:variable
name="entry.id">
<xsl:call-template name="object.id"> <xsl:with-param name="object" select="parent::*"/> </xsl:call-template> </xsl:variable> <xsl:variable
name="deflabel">
<xsl:apply-templates select="." mode="qanda.defaultlabel"/> </xsl:variable> <xsl:variable name="label.content"> <xsl:apply-templates select="." mode="label.markup"/> <xsl:if test="contains($deflabel, 'number') and not(label)"> <xsl:apply-templates select="." mode="intralabel.punctuation"/> </xsl:if> </xsl:variable> <fo:list-item id="{$entry.id}"
xsl:use-attribute-sets="list.item.spacing">
<fo:list-item-label id="{$id}" end-indent="label-end()"> <xsl:choose> <xsl:when test="string-length($label.content) > 0"> <fo:block font-weight="bold"> <xsl:copy-of select="$label.content"/> </fo:block> </xsl:when> <xsl:otherwise> <fo:block/> </xsl:otherwise> </xsl:choose> </fo:list-item-label> <fo:list-item-body start-indent="body-start()"> <xsl:choose> <xsl:when test="$deflabel = 'none' and not(label)"> <fo:block font-weight="bold"> <xsl:apply-templates select="*[local-name(.)!='label']"/> </fo:block> </xsl:when> <xsl:otherwise> <xsl:apply-templates select="*[local-name(.)!='label']"/> </xsl:otherwise> </xsl:choose> <!-- Uncomment this line to get revhistory output in the question --> <!-- <xsl:apply-templates select="preceding-sibling::revhistory"/> --> </fo:list-item-body> </fo:list-item> </xsl:template> From: Eric Nordlund
Sent: Thursday, April 04, 2013 11:05 PM
Subject: [docbook-apps] <qandaset defaultlabel="none"> FOP
error Hello, I?m unable to build a PDF from a docbook 4 document
that has a <qandaset defaultlabel=?none?> tag in it. If I remove the
attribute, everything works fine. If I leave it in, I get the following
errors: The
process 'Apache FOP' ended with code: 1. The
error was: ERROR - Couldn't find
hyphenation pattern for lang="en". ERROR -
Exception net.sf.saxon.trans.XPathException:
org.apache.fop.fo.ValidationException: "fo:list-item-label" is missing child
elements. Required content model: marker* (%block;)+ (See position
65:-1)
at org.apache.fop.cli.InputHandlerFOP.transformTo(Unknown
Source)
at org.apache.fop.cli.InputHandlerFOP.renderTo(Unknown
Source)
at org.apache.fop.cli.Main.startFOP(Main.java:177)
at org.apache.fop.cli.Main.main(Main.java:208) Caused by:
net.sf.saxon.trans.XPathException: org.apache.fop.fo.ValidationException:
"fo:list-item-label" is missing child elements. Required content model: marker*
(%block;)+ (See position 65:-1)
at net.sf.saxon.event.ContentHandlerProxy.handleSAXException(Unknown
Source)
at net.sf.saxon.event.ContentHandlerProxy.endElement(Unknown
Source)
at
net.sf.saxon.event.NamespaceReducer.endElement(NamespaceReducer.java:208)
at
net.sf.saxon.event.ReceivingContentHandler.endElement(ReceivingContentHandler.java:425)
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
net.sf.saxon.event.Sender.sendSAXSource(Sender.java:405)
at net.sf.saxon.event.Sender.send(Sender.java:152)
at
net.sf.saxon.IdentityTransformer.transform(IdentityTransformer.java:39)
... 4 more Caused by:
org.apache.fop.fo.ValidationException: "fo:list-item-label" is missing child
elements. Required content model: marker* (%block;)+ (See position
65:-1)
at
org.apache.fop.events.ValidationExceptionFactory.createException(ValidationExceptionFactory.java:38)
at
org.apache.fop.events.EventExceptionManager.throwException(EventExceptionManager.java:58)
at
org.apache.fop.events.DefaultEventBroadcaster$1.invoke(DefaultEventBroadcaster.java:175)
at $Proxy5.missingChildElement(Unknown Source)
at
org.apache.fop.fo.flow.AbstractListItemPart.endOfNode(AbstractListItemPart.java:89)
at
org.apache.fop.fo.flow.ListItemLabel.endOfNode(ListItemLabel.java:48)
at
org.apache.fop.fo.FOTreeBuilder$MainFOHandler.endElement(FOTreeBuilder.java:347)
at
org.apache.fop.fo.FOTreeBuilder.endElement(FOTreeBuilder.java:181)
... 21 more --------- net.sf.saxon.trans.XPathException:
org.apache.fop.fo.ValidationException: "fo:list-item-label" is missing child
elements. Required content model: marker* (%block;)+ (See position
65:-1)
at net.sf.saxon.event.ContentHandlerProxy.handleSAXException(Unknown
Source)
at net.sf.saxon.event.ContentHandlerProxy.endElement(Unknown
Source)
at
net.sf.saxon.event.NamespaceReducer.endElement(NamespaceReducer.java:208)
at
net.sf.saxon.event.ReceivingContentHandler.endElement(ReceivingContentHandler.java:425)
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
net.sf.saxon.event.Sender.sendSAXSource(Sender.java:405)
at net.sf.saxon.event.Sender.send(Sender.java:152)
at
net.sf.saxon.IdentityTransformer.transform(IdentityTransformer.java:39)
at org.apache.fop.cli.InputHandlerFOP.transformTo(Unknown
Source)
at org.apache.fop.cli.InputHandlerFOP.renderTo(Unknown
Source)
at org.apache.fop.cli.Main.startFOP(Main.java:177)
at org.apache.fop.cli.Main.main(Main.java:208) Caused by:
org.apache.fop.fo.ValidationException: "fo:list-item-label" is missing child
elements. Required content model: marker* (%block;)+ (See position
65:-1)
at
org.apache.fop.events.ValidationExceptionFactory.createException(ValidationExceptionFactory.java:38)
at
org.apache.fop.events.EventExceptionManager.throwException(EventExceptionManager.java:58)
at
org.apache.fop.events.DefaultEventBroadcaster$1.invoke(DefaultEventBroadcaster.java:175)
at $Proxy5.missingChildElement(Unknown Source)
at
org.apache.fop.fo.flow.AbstractListItemPart.endOfNode(AbstractListItemPart.java:89)
at
org.apache.fop.fo.flow.ListItemLabel.endOfNode(ListItemLabel.java:48)
at
org.apache.fop.fo.FOTreeBuilder$MainFOHandler.endElement(FOTreeBuilder.java:347)
at
org.apache.fop.fo.FOTreeBuilder.endElement(FOTreeBuilder.java:181)
... 21 more --------- org.apache.fop.fo.ValidationException:
"fo:list-item-label" is missing child elements. Required content model: marker*
(%block;)+ (See position 65:-1)
at
org.apache.fop.events.ValidationExceptionFactory.createException(ValidationExceptionFactory.java:38)
at
org.apache.fop.events.EventExceptionManager.throwException(EventExceptionManager.java:58)
at
org.apache.fop.events.DefaultEventBroadcaster$1.invoke(DefaultEventBroadcaster.java:175)
at $Proxy5.missingChildElement(Unknown Source)
at
org.apache.fop.fo.flow.AbstractListItemPart.endOfNode(AbstractListItemPart.java:89)
at
org.apache.fop.fo.flow.ListItemLabel.endOfNode(ListItemLabel.java:48)
at
org.apache.fop.fo.FOTreeBuilder$MainFOHandler.endElement(FOTreeBuilder.java:347)
at
org.apache.fop.fo.FOTreeBuilder.endElement(FOTreeBuilder.java:181)
at net.sf.saxon.event.ContentHandlerProxy.endElement(Unknown
Source)
at
net.sf.saxon.event.NamespaceReducer.endElement(NamespaceReducer.java:208)
at
net.sf.saxon.event.ReceivingContentHandler.endElement(ReceivingContentHandler.java:425)
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
net.sf.saxon.event.Sender.sendSAXSource(Sender.java:405)
at net.sf.saxon.event.Sender.send(Sender.java:152)
at
net.sf.saxon.IdentityTransformer.transform(IdentityTransformer.java:39)
at org.apache.fop.cli.InputHandlerFOP.transformTo(Unknown
Source)
at org.apache.fop.cli.InputHandlerFOP.renderTo(Unknown
Source)
at org.apache.fop.cli.Main.startFOP(Main.java:177)
at org.apache.fop.cli.Main.main(Main.java:208) Is this a known bug? I?m not sure whether the problem is with
docbook-xsl or fop. Is ther a workaround for this that doesn?t involve changing
my XML source code? Eric Nordlund Customer
Documentation and Training Cray
Inc. 901 5th
Ave Seattle, WA
98164 (206)701-2232 |
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]