DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40270>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=40270

           Summary: Make list item EndOfNode() method agile to strict-
                    validation
           Product: Fop
           Version: 1.0dev
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: PatchAvailable
          Severity: normal
          Priority: P2
         Component: fo tree
        AssignedTo: fop-dev@xmlgraphics.apache.org
        ReportedBy: [EMAIL PROTECTED]


[PATCH] This patch is needed to compensate for an error with Microsoft's Word
2003 WordprocessinML style sheet "Word2FO.xsl". McKesson is close to using FOP
at a pilot site and it would greatly help us if this change were made. I highly
doubt that we would experience a timely turn-around from Microsoft.

:::::::
As per Andreas Delmelle:

Hmm... We already allow table-bodies without child-nodes if strict validation is
turned off, so might as well add this. Not too much harm, I guess.

If it is producing list-item-labels without content --at least an empty block
would suffice-- then the stylesheet should be altered. It is resulting in FO
that does not adhere to the rules in the XSL-FO Rec, so it would be more
reasonable to change the stylesheet.

Either it should create an 'empty' list-item, with both label and body at least
containing an empty block, or it should not create a list-item at all.

:::::::
To reproduce:

<w:listPr>
    <aml:annotation aml:id="2" aml:author="."
aml:createdate="2003-03-20T11:54:00Z" w:type="Word.Insertion"/> </w:listPr>

Which causes the exception:

org.apache.fop.fo.ValidationException: null:2:26031: Error(2/26031):
fo:list-item-label is missing child elements. 
Required Content Model: marker* (%block;)+
        at
org.apache.fop.fo.FONode.missingChildElementError(FONode.java:407)
        at
org.apache.fop.fo.flow.AbstractListItemPart.endOfNode(AbstractListItemPa
rt.java:68)
        at
org.apache.fop.fo.flow.ListItemLabel.endOfNode(ListItemLabel.java:49)
        at
org.apache.fop.fo.FOTreeBuilder$MainFOHandler.endElement(FOTreeBuilder.j
ava:378)
        at
org.apache.fop.fo.FOTreeBuilder.endElement(FOTreeBuilder.java:194)
        at
org.apache.xalan.transformer.TransformerIdentityImpl.endElement(Transfor
merIdentityImpl.java:1103)
        at
org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
        at
org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unknown
Source)
        at
org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown
Source)
        at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDis
patcher.dispatch(Unknown Source)
        at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unkno
wn Source)
        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
Source)
        at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown
Source)
        at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
        at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown
Source)
        at
org.apache.xalan.transformer.TransformerIdentityImpl.transform(Transform
erIdentityImpl.java:494)
      . . .

:::::::
To get around this I modified the endOfNode() method in
org.apache.fop.fo.flow.AbstractListItemPart to only throw this exception if
strict validation is configured. A patch file containing this modification is
attached.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

Reply via email to