aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/fop/fo
diff options
context:
space:
mode:
authorAndreas L. Delmelle <adelmelle@apache.org>2006-08-17 10:25:27 +0000
committerAndreas L. Delmelle <adelmelle@apache.org>2006-08-17 10:25:27 +0000
commitad64e6fa0fba130c339efac1963511fa792d917b (patch)
tree024b77e417bd34129775edadde58bd22d674da55 /src/java/org/apache/fop/fo
parenta9c5d04c9282bce85c7e28c7192c4e3e866dfe4d (diff)
downloadxmlgraphics-fop-ad64e6fa0fba130c339efac1963511fa792d917b.tar.gz
xmlgraphics-fop-ad64e6fa0fba130c339efac1963511fa792d917b.zip
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
Diffstat (limited to 'src/java/org/apache/fop/fo')
-rw-r--r--src/java/org/apache/fop/fo/flow/AbstractListItemPart.java17
1 files 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;
}
-
+
}