From ad64e6fa0fba130c339efac1963511fa792d917b Mon Sep 17 00:00:00 2001 From: "Andreas L. Delmelle" Date: Thu, 17 Aug 2006 10:25:27 +0000 Subject: [PATCH] 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 --- .../fop/fo/flow/AbstractListItemPart.java | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) 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; } - + } -- 2.39.5