]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
PR:
authorGlen Mazza <gmazza@apache.org>
Mon, 4 Oct 2004 01:19:10 +0000 (01:19 +0000)
committerGlen Mazza <gmazza@apache.org>
Mon, 4 Oct 2004 01:19:10 +0000 (01:19 +0000)
Obtained from:
Submitted by:
Reviewed by:
Switched to SAXParseException for duplicate ID's found in document.

git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@198007 13f79535-47bb-0310-9956-ffa450edef68

src/java/org/apache/fop/fo/FObj.java

index afe60619e9d5cac1e0f9f88ef43a45164f511403..2e3e4e49dec3226777ca443ae5ae269b7ec56c27 100644 (file)
@@ -135,7 +135,7 @@ public class FObj extends FONode implements Constants {
      * This methods checks that the id isn't already used by another
      * fo and sets the id attribute of this object.
      */
-    private void setupID() {
+    private void setupID() throws SAXParseException {
         Property prop = this.propertyList.get(PR_ID);
         if (prop != null) {
             String str = prop.getString();
@@ -145,7 +145,9 @@ public class FObj extends FONode implements Constants {
                     id = str;
                     idrefs.add(id);
                 } else {
-                    getLogger().warn("duplicate id:" + str + " ignored");
+                    throw new SAXParseException("Property id \"" + str + 
+                        "\" previously used; id values must be unique" +
+                        " in document.", locator);
                 }
             }
         }