From: Andreas L. Delmelle Date: Thu, 17 Aug 2006 10:25:27 +0000 (+0000) Subject: Added relaxed validation for empty list-item-* (as produced by the buggy Microsoft... X-Git-Tag: fop-0_93~129 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=ad64e6fa0fba130c339efac1963511fa792d917b;p=xmlgraphics-fop.git Added relaxed validation for empty list-item-* (as produced by the buggy Microsoft Word2FO stylesheet) git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@432201 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/java/org/apache/fop/fo/flow/AbstractListItemPart.java b/src/java/org/apache/fop/fo/flow/AbstractListItemPart.java index 7ef26adbd..03b9e96a7 100644 --- a/src/java/org/apache/fop/fo/flow/AbstractListItemPart.java +++ b/src/java/org/apache/fop/fo/flow/AbstractListItemPart.java @@ -86,8 +86,19 @@ public abstract class AbstractListItemPart extends FObj { * @see org.apache.fop.fo.FONode#endOfNode */ protected void endOfNode() throws FOPException { - if (!blockItemFound) { - missingChildElementError("marker* (%block;)+"); + if (!this.blockItemFound) { + String contentModel = "marker* (%block;)+"; + if (getUserAgent().validateStrictly()) { + missingChildElementError(contentModel); + } else { + StringBuffer message = new StringBuffer( + errorText(getLocator())); + message.append(getName()) + .append(" is missing child elements. ") + .append("Required Content Model: ") + .append(contentModel); + getLogger().warn(message.toString()); + } } } @@ -100,6 +111,6 @@ public abstract class AbstractListItemPart extends FObj { public String getId() { return id; } - + }