Bug 18977

Summary: Duplicate ID reported in ListItemLabel
Product: Fop - Now in Jira Reporter: Peter Kullmann <p.kullmann>
Component: generalAssignee: fop-dev
Status: CLOSED DUPLICATE    
Severity: normal CC: pbort
Priority: P3    
Version: 0.20.5   
Target Milestone: ---   
Hardware: Other   
OS: other   

Description Peter Kullmann 2003-04-13 07:37:32 UTC
I have a large fo-document generated by docbook with the following problem: FOP
complains about 'The id "id2914022" already exists in this document' (although
it doesn't).

Unfortunately, I haven't been able to reduce the document to a small size and
still reproduce the error. But I think I know where the problem lies and have
patched fop to make it work for me. 

In a particular instance of a fo:list-item in my document ListItemLabel.layout
is called twice (with different BlockAreas). In the second call the duplicate ID
error is generated.

I have patched org.apache.fop.fo.flow.ListItemLabel layout to:

-bash-2.05b$ cvs diff src/org/apache/fop/fo/flow/ListItemLabel.java
Index: src/org/apache/fop/fo/flow/ListItemLabel.java
===================================================================
RCS file:
/home/cvspublic/xml-fop/src/org/apache/fop/fo/flow/Attic/ListItemLabel.java,v
retrieving revision 1.11.2.6
diff -r1.11.2.6 ListItemLabel.java
97,106c97,109
<         String id = this.properties.get("id").getString();
<         try {
<             area.getIDReferences().initializeID(id, area);
<         }
<         catch(FOPException e) {
<             if (!e.isLocationSet()) {
<                 e.setLocation(systemId, line, column);
<             }
<             throw e;
<         }
---
>       if (this.marker == START) {
>           String id = this.properties.get("id").getString();
>           try {
>               area.getIDReferences().initializeID(id, area);
>           }
>           catch(FOPException e) {
>               if (!e.isLocationSet()) {
>                   e.setLocation(systemId, line, column);
>               }
>               throw e;
>           }
>           marker = 0;
>       }

It just tracks the first time layout gets called with this particular ListItemLabel.

I have no idea whether it is at all correct that a list-item-label should be
layouted on two different areas (in my case it just says "2.3.2" and shouldn't
break).
Comment 1 Jacob Emcken 2004-01-14 15:40:21 UTC

*** This bug has been marked as a duplicate of 14962 ***
Comment 2 Glenn Adams 2012-04-01 13:50:08 UTC
batch transition to closed remaining pre-FOP1.0 resolved bugs