]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
Added relaxed validation for empty list-item-* (as produced by the buggy Microsoft...
authorAndreas L. Delmelle <adelmelle@apache.org>
Thu, 17 Aug 2006 10:25:27 +0000 (10:25 +0000)
committerAndreas L. Delmelle <adelmelle@apache.org>
Thu, 17 Aug 2006 10:25:27 +0000 (10:25 +0000)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@432201 13f79535-47bb-0310-9956-ffa450edef68

src/java/org/apache/fop/fo/flow/AbstractListItemPart.java

index 7ef26adbdcc40eec5b687396d00497bf9721ee77..03b9e96a7861ed327e542e7f4c3094977808d226 100644 (file)
@@ -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;
     }
-
+    
 }