You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Mark Williams <ma...@skwirel.com> on 2004/02/04 20:32:16 UTC

error = id already exists

Hi,

I've searched the mailing lists for info on the above error, but couldn't
find anything much on the subject.

Basically, we have a largeish xslt stylesheet (produces roughly a 12 page
document), which contains a table with rows that repeat for however many
times a particular node appears in the XML file.  If it appears more than
once, so that the table row has to be repeated, we keep getting the above
FOP exception, ie that the id exists.  The id is the id assigned by FOP to
the fo:wrapper property for each row.  There is an error statement for each
fo-wrapper for each row I have checked the xslt stylesheet and there is no
duplication.

Although I could find one or two threads on the subject, I could not
actually find a resolution and the problems seemed to be related to manually
assigned ids not FOP assigned ids as in this case.  Unless it's something
that I'm doing wrong, I'm surprised that this problem has not cropped up
more often.

Does anyone please know of a solution to this problem.

Yours gratefully,

Mark Williams


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org


Re: error = id already exists

Posted by "J.Pietschmann" <j3...@yahoo.de>.
Adrian Sobotta wrote:

> You can get passed this problem by applying the patch that Nancy Deschenes
> wrote.. I got her patch, recompiled that class and updated the jar and all
> was good again.. Here is the link to the bug report and patch:
> http://nagoya.apache.org/bugzilla/show_bug.cgi?id=3497

This patch is already in the code. There are still FOs which
don't unregister the id in case of undoing some layout, IIRC
the cases left require some more thinking in order to get it
right.

J.Pietschmann

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org


RE: error = id already exists

Posted by Adrian Sobotta <as...@internet.org.au>.
You can get passed this problem by applying the patch that Nancy Deschenes
wrote.. I got her patch, recompiled that class and updated the jar and all
was good again.. Here is the link to the bug report and patch:
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=3497



-----Original Message-----
From: Peer Brink [mailto:brink@riege.com] 
Sent: Thursday, 5 February 2004 3:50 PM
To: fop-user@xml.apache.org
Subject: Re: error = id already exists

Hi everybody,

J.Pietschmann wrote:
> There's also a slight chance you got the still not completely fixed
> duplicate id bug, which may bite you in a few somewhat exotic
> situations. If your FO file doesn't have dupliacted ids, send in
> the FO snippet surrounding the place where the objectionable id
> occurs.

I do have exactly this problem. I generate fo from Docbook-XML with
docbook-xslt-stylesheets version 1.64.0 and I get the error

null:640:1159 The id "d0e1379" already exists in this document

from Fop 0.20.5 when generating PDF. Please note that the id from the
error-message is in fact unique in the complete FO-document. Please see
below the fo-snippet containing the id.

Thanks for any help,
Peer.

<fo:block id="d0e1373">
 <fo:block>
  <fo:block>
   <fo:block keep-together="always" margin-left="0cm"
font-family="Helvetica,Arial,sans-serif,Symbol,ZapfDingbats">
    <fo:block keep-with-next.within-column="always">
     <fo:block font-family="Helvetica,Arial,sans-serif" font-weight="bold"
keep-with-next.within-column="always" space-before.minimum="0.8em"
space-before.optimum="1.0em" space-before.maximum="1.2em">
      <fo:marker marker-class-name="section.head.marker">4. FAQ - Frequently
asked Questions (and answers)
      </fo:marker>
      <fo:block font-size="24.8832pt">4. FAQ - Frequently asked Questions
(and answers)</fo:block>
     </fo:block>
    </fo:block>
   </fo:block>
  </fo:block>
  <fo:block/>
 </fo:block>
 <fo:block id="d0e1376">
  <fo:list-block space-before.optimum="0em" space-before.minimum="0em"
space-before.maximum="0em" space-after.optimum="1em"
space-after.minimum="0.8em" space-after.maximum="1.2em"
provisional-label-separation="0.2em"
provisional-distance-between-starts="2.5em">
   <fo:list-item space-before.optimum="0.8em" space-before.minimum="0.5em"
space-before.maximum="1.0em" id="d0e1378">
    <fo:list-item-label id="d0e1379" end-indent="label-end()">
     <fo:block>4.1.
     </fo:block>
    </fo:list-item-label>
    <fo:list-item-body start-indent="body-start()">
     <fo:block space-before.optimum="1em" space-before.minimum="0.8em"
space-before.maximum="1.2em">Which editor program should I use?</fo:block>
    </fo:list-item-body>
   </fo:list-item>
   <fo:list-item space-before.optimum="0.8em" space-before.minimum="0.5em"
space-before.maximum="1.0em">
    <fo:list-item-label id="d0e1382" end-indent="label-end()">
     <fo:block/>
    </fo:list-item-label>
    <fo:list-item-body start-indent="body-start()">
     <fo:block space-before.optimum="1em" space-before.minimum="0.8em"
space-before.maximum="1.2em">Use whatever you like - your favourite text/XML
editor.</fo:block>
    </fo:list-item-body>
   </fo:list-item>
  </fo:list-block>
 </fo:block>
</fo:block>


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org


Re: error = id already exists

Posted by Peer Brink <br...@riege.com>.
Hi everybody,

J.Pietschmann wrote:
> There's also a slight chance you got the still not completely fixed
> duplicate id bug, which may bite you in a few somewhat exotic
> situations. If your FO file doesn't have dupliacted ids, send in
> the FO snippet surrounding the place where the objectionable id
> occurs.

I do have exactly this problem. I generate fo from Docbook-XML with docbook-xslt-stylesheets version 1.64.0 and I get the error

null:640:1159 The id "d0e1379" already exists in this document

from Fop 0.20.5 when generating PDF. Please note that the id from the error-message is in fact unique in the complete FO-document. Please see below the fo-snippet containing the id.

Thanks for any help,
Peer.

<fo:block id="d0e1373">
 <fo:block>
  <fo:block>
   <fo:block keep-together="always" margin-left="0cm" font-family="Helvetica,Arial,sans-serif,Symbol,ZapfDingbats">
    <fo:block keep-with-next.within-column="always">
     <fo:block font-family="Helvetica,Arial,sans-serif" font-weight="bold" keep-with-next.within-column="always" space-before.minimum="0.8em" space-before.optimum="1.0em" space-before.maximum="1.2em">
      <fo:marker marker-class-name="section.head.marker">4. FAQ - Frequently asked Questions (and answers)
      </fo:marker>
      <fo:block font-size="24.8832pt">4. FAQ - Frequently asked Questions (and answers)</fo:block>
     </fo:block>
    </fo:block>
   </fo:block>
  </fo:block>
  <fo:block/>
 </fo:block>
 <fo:block id="d0e1376">
  <fo:list-block space-before.optimum="0em" space-before.minimum="0em" space-before.maximum="0em" space-after.optimum="1em" space-after.minimum="0.8em" space-after.maximum="1.2em" provisional-label-separation="0.2em" provisional-distance-between-starts="2.5em">
   <fo:list-item space-before.optimum="0.8em" space-before.minimum="0.5em" space-before.maximum="1.0em" id="d0e1378">
    <fo:list-item-label id="d0e1379" end-indent="label-end()">
     <fo:block>4.1.
     </fo:block>
    </fo:list-item-label>
    <fo:list-item-body start-indent="body-start()">
     <fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">Which editor program should I use?</fo:block>
    </fo:list-item-body>
   </fo:list-item>
   <fo:list-item space-before.optimum="0.8em" space-before.minimum="0.5em" space-before.maximum="1.0em">
    <fo:list-item-label id="d0e1382" end-indent="label-end()">
     <fo:block/>
    </fo:list-item-label>
    <fo:list-item-body start-indent="body-start()">
     <fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">Use whatever you like - your favourite text/XML editor.</fo:block>
    </fo:list-item-body>
   </fo:list-item>
  </fo:list-block>
 </fo:block>
</fo:block>


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org


Re: error = id already exists

Posted by Mark Williams <ma...@skwirel.com>.
Hi,

Thanks for the replies.

I've now found a way of removing the problem from the template concerned and
that is to remove any fo:wrapper tags.  These are the source of the problem
and their removal does not seem to have any impact on the outputted pdf.

Thanks again,

Mark

----- Original Message -----
From: "J.Pietschmann" <j3...@yahoo.de>
To: <fo...@xml.apache.org>
Sent: Wednesday, February 04, 2004 9:31 PM
Subject: Re: error = id already exists


> Mark Williams wrote:
> > Hi,
> >
> > I've searched the mailing lists for info on the above error, but
couldn't
> > find anything much on the subject.
> >
> > Basically, we have a largeish xslt stylesheet (produces roughly a 12
page
> > document), which contains a table with rows that repeat for however many
> > times a particular node appears in the XML file.  If it appears more
than
> > once, so that the table row has to be repeated, we keep getting the
above
> > FOP exception, ie that the id exists.  The id is the id assigned by FOP
to
> > the fo:wrapper property for each row.  There is an error statement for
each
> > fo-wrapper for each row I have checked the xslt stylesheet and there is
no
> > duplication.
>
> FOP does not assign IDs. You are actually using a two stage process:
> 1st stage: transforming the XML into XSLFO using the style sheet
> 2nd stage: rendering the XSLFO into the output format.
>
> It's quite possible that the same id is used multiple times even
> if it is only once in the style sheet. Run the transformation
> standalone
>   http://xml.apache.org/fop/running.html#check-input
> and examine the output.
>
> There's also a slight chance you got the still not completely fixed
> duplicate id bug, which may bite you in a few somewhat exotic
> situations. If your FO file doesn't have dupliacted ids, send in
> the FO snippet surrounding the place where the objectionable id
> occurs.
>
> J.Pietschmann
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
> For additional commands, e-mail: fop-user-help@xml.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org


Re: error = id already exists

Posted by "J.Pietschmann" <j3...@yahoo.de>.
Mark Williams wrote:
> Hi,
> 
> I've searched the mailing lists for info on the above error, but couldn't
> find anything much on the subject.
> 
> Basically, we have a largeish xslt stylesheet (produces roughly a 12 page
> document), which contains a table with rows that repeat for however many
> times a particular node appears in the XML file.  If it appears more than
> once, so that the table row has to be repeated, we keep getting the above
> FOP exception, ie that the id exists.  The id is the id assigned by FOP to
> the fo:wrapper property for each row.  There is an error statement for each
> fo-wrapper for each row I have checked the xslt stylesheet and there is no
> duplication.

FOP does not assign IDs. You are actually using a two stage process:
1st stage: transforming the XML into XSLFO using the style sheet
2nd stage: rendering the XSLFO into the output format.

It's quite possible that the same id is used multiple times even
if it is only once in the style sheet. Run the transformation
standalone
  http://xml.apache.org/fop/running.html#check-input
and examine the output.

There's also a slight chance you got the still not completely fixed
duplicate id bug, which may bite you in a few somewhat exotic
situations. If your FO file doesn't have dupliacted ids, send in
the FO snippet surrounding the place where the objectionable id
occurs.

J.Pietschmann

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org


Re: error = id already exists

Posted by Chris Pratt <ch...@planetpratt.com>.
You probably have to id="<value>" with the same value.  Remember, id values
must be unique across the whole document, not just the element they are used
on.
  (*Chris*)

----- Original Message ----- 
From: "Mark Williams" <ma...@skwirel.com>
To: <fo...@xml.apache.org>
Sent: Wednesday, February 04, 2004 11:32 am
Subject: error = id already exists


> Hi,
>
> I've searched the mailing lists for info on the above error, but couldn't
> find anything much on the subject.
>
> Basically, we have a largeish xslt stylesheet (produces roughly a 12 page
> document), which contains a table with rows that repeat for however many
> times a particular node appears in the XML file.  If it appears more than
> once, so that the table row has to be repeated, we keep getting the above
> FOP exception, ie that the id exists.  The id is the id assigned by FOP to
> the fo:wrapper property for each row.  There is an error statement for
each
> fo-wrapper for each row I have checked the xslt stylesheet and there is no
> duplication.
>
> Although I could find one or two threads on the subject, I could not
> actually find a resolution and the problems seemed to be related to
manually
> assigned ids not FOP assigned ids as in this case.  Unless it's something
> that I'm doing wrong, I'm surprised that this problem has not cropped up
> more often.
>
> Does anyone please know of a solution to this problem.
>
> Yours gratefully,
>
> Mark Williams
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
> For additional commands, e-mail: fop-user-help@xml.apache.org
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org