Using for-each w/ page-sequence results in "NC105 ID already exists in this document" error

2007-09-19 Thread Sharon_Harris


I am unable to generate a PDF file using a for-each loop before a page
sequence if I am using IDs.I am using XSLT 1.0 and Apache FOP.

I have a couple of page sequences defined. In 1 page sequence, I have a TOC
with IDs that point to elements that are outputted in a 2nd page sequence.
The 2nd page sequence is for Lessons and starts with a for-each loop
calling a Lesson element that will output all the lesson content within the
body of the Lesson page sequence. However, I encounter the following error:
"NC105 ID already exists in this document".

I have unique ID prefixes specified in all Lesson children elements that
are to be listed in the TOC so I am unsure why the IDs are repeated for
each instance of the Lesson element.

I have tried creating the Lesson page sequence without using a for-each
loop and merely using 
and this outputs fine except that the page sequence instructions do not
repeat for every instance of the Lesson element. For example, I specify
that the 1st page of each lesson should not have a header but only the 1st
instance of the Lesson element has no header displaying but all other
Lesson element instances have a header on the 1st page. But I do not run
into the issue that the IDs are not unique for each instance of a Lesson
element.

Am I correct in thinking that in order to get the page sequence to start
over for each instance of the Lesson element, that I need to have a
for-each statement before the page sequence? If so, how do I ensure the IDs
are unique for every instance of the Lesson element?

Thanks!
Sharon


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



AW: Page breaks and keeping blocks together

2007-09-19 Thread Lewis, Eric
Yes, but the problem there is: If I do that, the long body text will
cause an overflow, and half of my text ends up in nirvana  ;-)

Best regards,
Eric 




Von: Pascal Sancho [mailto:[EMAIL PROTECTED] 
Gesendet: Mittwoch, 19. September 2007 16:47
An: fop-users@xmlgraphics.apache.org
Betreff: RE : Page breaks and keeping blocks together


Eric,
 
You should use keep-with-next on title (or keep-with-previous on
1st para), that should do the trick.
 
Pascal

 Message d'origine 
De: Lewis, Eric [mailto:[EMAIL PROTECTED] 
Date: mer. 19/09/2007 16:33 



Hi

I'm having again a problem of page breaks and keeping
things together (I
last wrote to this list in June 07).

I have a paragraph with a title and a body afterwards
that must be kept
together if possible. As a fix to my last problem, I
check whether the
title and body should be kept together always or whether
I let FOP do
the page breaks.

This means I have something like
  

  

  auto


  always

  
  

  

In apply-templates, some escaped pseudo-HTML is
converted into XSL-FO,
so at the end I have something like

   my title
   my body bla bla bla bla
bla


and for really long texts

   my other
title
   Really, really long text, much longer than
I care to type
here...


Most of the blocks are used for breaks, as you can see.

However, my problem is that at some point, the bold
title is standing on
its own, and the body appears on the next page, like

my other title
--- page break
Really, really long text,
much longer than I care to
type here...

Not really nice! :-)
But hey, that's what orphans and widows are for, but
after using them:

  

  

  auto
  3
  3


  always

  
  

  

The result is much worse, the titles appear as orphans
all over the
place. Besides, as I understand the default is 2, so
this should never
happen (?)

I'm certainly doing something wrong, but what? I'd be
glad for any hints
:-)

Best regards,
Eric



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: FOTreeBuilder warning messages

2007-09-19 Thread Andreas L Delmelle

On Sep 19, 2007, at 11:04, Kevin wrote:

Hi

Sorry, I didn't provide the complete details of the server  
environment FOP is

running:


If you say that 'the same XSL works fine in your development  
environment', does that also mean 'the same XML'? Can you check with  
the *exact* same XML + XSLT, and see if that gives you a clue?


Other things that come to mind:
Have you succeeded in rendering the PDF (including post-processing  
the Area Tree) in your development environment? If so, then the most  
obvious suspect is either the XML parser or XSLT processor in the  
server environment (if it's not the XML: see above).
Can you provide some more details on the exact steps your Java code  
takes to complete the full cycle (XML -> PDF)?


Try to perform the XSL transform only, but in the server environment  
(or with the *exact* same configuration, at least), and take a look  
at the resulting FO. As Pascal already hinted at, the error should be  
in there. It occurs while parsing the FO, not when rendering the Area  
Tree... That's why I somehow suspect that you did try the same  
stylesheet, but with a different (simplified?) XML.



HTH!

Andreas

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE : Page breaks and keeping blo cks together

2007-09-19 Thread Pascal Sancho
Eric,
 
You should use keep-with-next on title (or keep-with-previous on 1st para), 
that should do the trick.
 
Pascal

 Message d'origine 
De: Lewis, Eric [mailto:[EMAIL PROTECTED] 
Date: mer. 19/09/2007 16:33 



Hi

I'm having again a problem of page breaks and keeping things together (I
last wrote to this list in June 07).

I have a paragraph with a title and a body afterwards that must be kept
together if possible. As a fix to my last problem, I check whether the
title and body should be kept together always or whether I let FOP do
the page breaks.

This means I have something like
  

  

  auto


  always

  
  

  

In apply-templates, some escaped pseudo-HTML is converted into XSL-FO,
so at the end I have something like

   my title
   my body bla bla bla bla bla


and for really long texts

   my other title
   Really, really long text, much longer than I care to type
here...


Most of the blocks are used for breaks, as you can see.

However, my problem is that at some point, the bold title is standing on
its own, and the body appears on the next page, like

my other title
--- page break
Really, really long text,
much longer than I care to
type here...

Not really nice! :-)
But hey, that's what orphans and widows are for, but after using them:

  

  

  auto
  3
  3


  always

  
  

  

The result is much worse, the titles appear as orphans all over the
place. Besides, as I understand the default is 2, so this should never
happen (?)

I'm certainly doing something wrong, but what? I'd be glad for any hints
:-)

Best regards,
Eric


<>-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Page breaks and keeping blocks together

2007-09-19 Thread Lewis, Eric
Hi

I'm having again a problem of page breaks and keeping things together (I
last wrote to this list in June 07).

I have a paragraph with a title and a body afterwards that must be kept
together if possible. As a fix to my last problem, I check whether the
title and body should be kept together always or whether I let FOP do
the page breaks.

This means I have something like
  

  

  auto


  always

  
  

  

In apply-templates, some escaped pseudo-HTML is converted into XSL-FO,
so at the end I have something like

   my title
   my body bla bla bla bla bla


and for really long texts

   my other title
   Really, really long text, much longer than I care to type
here...


Most of the blocks are used for breaks, as you can see.

However, my problem is that at some point, the bold title is standing on
its own, and the body appears on the next page, like

my other title
--- page break
Really, really long text,
much longer than I care to
type here...

Not really nice! :-)
But hey, that's what orphans and widows are for, but after using them:

  

  

  auto
  3
  3


  always

  
  

  

The result is much worse, the titles appear as orphans all over the
place. Besides, as I understand the default is 2, so this should never
happen (?)

I'm certainly doing something wrong, but what? I'd be glad for any hints
:-)

Best regards,
Eric

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE : RE: FOTreeBuilder warning messages

2007-09-19 Thread Pascal Sancho
Hi,
 
Reading your Log messages ("endElement Mismatch: table-cell"), I guess end tags 
are missing to these elements.
 
This is why I said that your FO is trunkated.
Can you check that in your server environment?
 
If that is the case, I suspect there is something wrong with XML in Webserve.
There is a lot of similar problem in mailing list archive (follow there: 
http://www.nabble.com/forum/Search.jtp?forum=353&local=y&query=Websphere)
 
You should probably find more precise answer there (unfortunately, I'm not a 
Java guru...)
 
HTH
 
SP

 Message d'origine 
De: news de la part de Kevin 
Date: mer. 19/09/2007 10:49 



Pascal,

Thanks for getting back. Here are the environment details:
- FOP 0.94
- Websphere 6.0 server

I do not have any idea as to where to start from to resolve this error. 
My
requirement needs some post processing before rendering the final PDF, 
so I
create the Area Tree first and then apply another stylesheet on the 
area tree
and finally transform that output to PDF.

To isolate the problem, I eliminated the creation of Area tree and did 
FO ->
PDF. Whay do you think the FO could be truncated?. I'll try and get the 
FO
output and see if something is wrong. Even though the warnings occur, 
the PDF
comes out fine. But if I try to create the Area tree first and then PDF 
from the
area tree I get the following error - "Current regionViewPort must be 
null" and
the PDF does not get created.

You also wrote that I need to look into the XSLT stage. Do you mean the 
XML to
FO could be a issue??. But this works fine on my development machine 
and its a
problem only on the server envirnonment.

Any help is greatly appreciated.

Thanks
kevin


<>-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Re: FOP seems to generate a truncated PDF

2007-09-19 Thread Michael Bruns
Hi François,

sorry for digging up this old topic again, but I face exactly the same
problem now and it might be really helpful if you could tell me how you
solved it.

I updated my application from FOP 0.93 to 0.94 recently and everything
worked fine. I kept using Xerces 2.6.2 as another resource in my
application depended on this, but this didn't affect FOP 0.94 at all.
Now Xerces hat to be updated, too, and no matter which newer version I
use (I tried 2.7.1 and 2.8.1), they all cause the error you mentioned
when I try to merge two documents into one with the help of iText:

java.io.IOException: Rebuild failed: trailer not found.; Original
message: PDF startxref not found.

I also tried updating iText from 1.4.8 to 1.5.3 and even 2.0.5 - still
no change. So I am quite understandbly interested in what caused your
problem and how you solved it in the end.

Thanks for your help :-)

Cheers

Michael

On 15.06.2007 15:30, fritaly wrote:
> Hi,
> 
> I have a java server whose responsibility is to generate PDF reports by
> using FOP 0.20.5. 
> 
> Sometimes, I have to generate many reports from a single input XML file so I
> have a loop (so no multi-threading here) where, for each iteration, I create
> a new temporary file and let FOP render the PDF into it. It turns out that
> some of those PDFs are truncated. 
> 
> I stumbled upon that bug because I'm trying (by using iText) to merge these
> PDFs into a new PDF file. But iText complains and throws an exception
> saying: "Rebuild failed: trailer not found.; Original message: PDF startxref
> not found."
> 
> When I view the PDF files generated by FOP, some of them are "complete" but
> some others are truncated: the "startxref" element is missing.
> 
> (See uploaded PDF and images for a view of a valid and a truncated PDF
> file).
> 
> Is this bug already known ? Is there sometimes I should do to avoid this ?
> 
> Thanks a lot.
> 
> Cheers,
> 
> François http://www.nabble.com/file/p11139570/valid-pdf.gif 
> http://www.nabble.com/file/p11139570/truncated-pdf.gif 
> http://www.nabble.com/file/p11139570/LYT31033.PDF LYT31033.PDF 

-- 
Michael Bruns1&1 Internet AG
ShopDev  Ernst-Frey-Str. 9
[EMAIL PROTECTED]   76135 Karlsruhe
http://www.1und1.de

Amtsgericht Montabaur HRB 6484

Vorstand: Henning Ahlert, Ralph Dommermuth, Matthias Ehrlich, Andreas
Gauger, Matthias Greve, Robert Hoffmann, Norbert Lang, Achim Weiss
Aufsichtsratsvorsitzender: Michael Scheeren

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: FOTreeBuilder warning messages

2007-09-19 Thread Kevin
Pascal,

Sorry, I didn't provide the complete details of the server environment FOP is
running:

- FOP 0.94
- Websphere 6.0 Application server
- Windows 2003
- Xerces/Xalan
- Fop is embeded in Java

Thanks
kevin


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: FOTreeBuilder warning messages

2007-09-19 Thread Kevin
Pascal,

Thanks for getting back. Here are the environment details:
- FOP 0.94
- Websphere 6.0 server

I do not have any idea as to where to start from to resolve this error. My
requirement needs some post processing before rendering the final PDF, so I
create the Area Tree first and then apply another stylesheet on the area tree
and finally transform that output to PDF. 

To isolate the problem, I eliminated the creation of Area tree and did FO ->
PDF. Whay do you think the FO could be truncated?. I'll try and get the FO
output and see if something is wrong. Even though the warnings occur, the PDF
comes out fine. But if I try to create the Area tree first and then PDF from the
area tree I get the following error - "Current regionViewPort must be null" and
the PDF does not get created. 

You also wrote that I need to look into the XSLT stage. Do you mean the XML to
FO could be a issue??. But this works fine on my development machine and its a
problem only on the server envirnonment.

Any help is greatly appreciated.

Thanks
kevin 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]