You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by bu...@apache.org on 2006/08/16 21:43:18 UTC

DO NOT REPLY [Bug 40270] New: - Make list item EndOfNode() method agile to strict-validation

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: gary.reed@mckesson.com


[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.

DO NOT REPLY [Bug 40270] - [PATCH] Make list item EndOfNode() method agile to strict-validation

Posted by bu...@apache.org.
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


a_l.delmelle@pandora.be changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED




------- Additional Comments From a_l.delmelle@pandora.be  2006-08-17 10:24 -------
Patch applied with very small modifications.
see: http://svn.apache.org/viewvc?rev=432201&view=rev

Thanks!

-- 
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.

DO NOT REPLY [Bug 40270] - Make list item EndOfNode() method agile to strict-validation

Posted by bu...@apache.org.
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





------- Additional Comments From gary.reed@mckesson.com  2006-08-16 19:45 -------
Created an attachment (id=18725)
 --> (http://issues.apache.org/bugzilla/attachment.cgi?id=18725&action=view)
Patch for AbstractListItemPart.java


-- 
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.

DO NOT REPLY [Bug 40270] - [PATCH] Make list item EndOfNode() method agile to strict-validation

Posted by bu...@apache.org.
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


bowditch_chris@hotmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|Make list item EndOfNode()  |[PATCH] Make list item
                   |method agile to strict-     |EndOfNode() method agile to
                   |validation                  |strict-validation




------- Additional Comments From bowditch_chris@hotmail.com  2006-08-17 07:56 -------
Thanks for the patch!

-- 
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.