I already posted this fix (on friday). However, it seems
to have been lost in the great void, because i can't find
it in the archive (http://xml.apache.org/mail/fop-dev/200109).
Sorry, if this should be a double.
Bug 3497: "id already exists error" when using span="all" attribute
Reason: if a BodyAreaContainer is not balanced, Block.layout(...)
is called a second time for the same Block due to the rollback:
---
[in src/org/apache/fop/fo/flow/Flow.java]
if (bac.isBalancingRequired(fo)) {
// reset the the just-done span area in preparation
// for a backtrack for balancing
bac.resetSpanArea();
this.rollback(markerSnapshot);
// one less because of the "continue"
i = this.marker - 1;
continue;
}
---
Block.layout checks if the block-id already exists (which it
does, of course, from the first time) und fails with the error.
(Might this be broken in similar places too?)
I've attached a diff with the fix.
cu
Oliver
Index: src/org/apache/fop/fo/flow/Block.java
===================================================================
RCS file: /home/cvspublic/xml-fop/src/org/apache/fop/fo/flow/Block.java,v
retrieving revision 1.41
diff -r1.41 Block.java
164,165d163
< this.id = this.properties.get("id").getString();
<
170,171c168,173
< if (area.getIDReferences() != null)
< area.getIDReferences().createID(id);
---
> if (this.id == null) {
> this.id = this.properties.get("id").getString();
>
> if (area.getIDReferences() != null)
> area.getIDReferences().createID(id);
> }
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]