RE: AW: large tables loop problem

2002-10-04 Thread Rhett Aultman
Title: Nachricht



Easiest way I can think of- cut out the first half of the table 
content.  See if rendering breaks.  If it doesn't, then the 
problem is in the second half of the table content, so focus on that.  Keep 
paring out half of your table content until you've either found the content 
that's causing your headaches or until the bug vanishes and you get more 
headaches  ;)

  -Original Message-From: Tobias Kuhn 
  [mailto:[EMAIL PROTECTED]]Sent: Friday, October 04, 
  2002 5:43 AMTo: [EMAIL PROTECTED]Subject: AW: AW: 
  large tables loop problem
  
  Now i have got out 
  the "file.fo"
  it is about 11400 
  lines long!!! and the size is 1.8mb
  how can i find the 
  place producing the endless loop? or can i find out what is wrong with this 
  file?
   
  Tobias 
  Kuhn


AW: AW: large tables loop problem

2002-10-04 Thread Tobias Kuhn
Title: Nachricht



Now i have got out 
the "file.fo"
it is about 11400 
lines long!!! and the size is 1.8mb
how can i find the 
place producing the endless loop? or can i find out what is wrong with this 
file?
 
Tobias 
Kuhn


AW: AW: AW: large tables loop problem

2002-10-04 Thread Tobias Kuhn
Title: Nachricht




Now i have got out 
the "file.fo"
it is about 11400 
lines long!!! and the size is 1.8mb
how can i find the 
place producing the endless loop? or can i find out what is wrong with this 
file?
 
Tobias 
Kuhn


Re: AW: AW: large tables loop problem

2002-10-03 Thread J.Pietschmann

Tobias Kuhn wrote:
> i don't know how to view my xslt result.
Hey, be a bit more creative!

> so i have written a java class with the following code:
>  
> {
> // create XML Tree with project data
>   Document doc = DocumentFactory.getInstance().createDocument();
>   YpiXML ypiXML = new YpiXML(projekt);
>  
>   ypiXML.setFile(outFile);
>   ypiXML.saveProjektDaten(doc, true);
>  
>  OutputStream xmlstream = new ByteArrayOutputStream();
>  ByteArrayInputStream istream = null;
>  String s = "";
>  OutputFormat outFormat = new OutputFormat();
>  outFormat.setEncoding("windows-1252");
>  XMLWriter writer = new XMLWriter(xmlstream,outFormat);
>  writer.write(doc);
>  writer.flush();
>  s = xmlstream.toString();
>  stream = new ByteArrayInputStream(s.getBytes());
> String stemp = istream.toString();
>  istream.close();
> Source strSource = new StreamSource(new StringReader(s));

This is really ugly. Look up javax.xml.transform.dom.DOMSource.

> TransformerFactory transformerFactory = TransformerFactory.newInstance
> ();
>   
> Templates template = transformerFactory.newTemplates(new
> StreamSource(xslFile));
> Transformer transformer = template.newTransformer();
> Driver driver = new Driver();
> driver.setRenderer(driver.RENDER_PDF);
> FileOutputStream fo = new FileOutputStream(outFile);
> driver.setOutputStream(fo);
> Result saxResult = new SAXResult( driver.getContentHandler() );
> transformer.transform( strSource, saxResult );

Omit the driver, and use
  transformer.transform( strSource, new StreamResult(new File("file.fo")));

J.Pietschmann


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




AW: large tables loop problem

2002-10-02 Thread Tobias Kuhn
Title: Nachricht



this 
program does't seem to work for me,
i 
always get an error "character not allowed"...

  
  -Ursprüngliche Nachricht-Von: Rhett Aultman 
  [mailto:[EMAIL PROTECTED]] Gesendet: Mittwoch, 2. Oktober 
  2002 15:59An: [EMAIL PROTECTED]Betreff: RE: large 
  tables loop problem
  Run 
  your XML file and XSL file through the XT program found here: http://www.blnz.com/xt/index.html
   
  This 
  should give you an XSLT result.  The resulting information should be a 
  purely FO document so that any of us could immediately run it in FOP and see 
  what's what.
  
-Original Message-From: Tobias Kuhn 
[mailto:[EMAIL PROTECTED]]Sent: Wednesday, October 
02, 2002 9:54 AMTo: [EMAIL PROTECTED]Subject: AW: 
    large tables loop problem
Hello,
 
i 
don't know how to view my xslt result.
i 
am working on a project , where all the data of the software can be saved to 
xml...
now i want to create a pdf report file out of the xml data, and i 
only provide and xsl file with FO tags.
so 
i have written a java class with the following code:
 
{
// create XML Tree with project data
  Document doc = 
DocumentFactory.getInstance().createDocument();  YpiXML ypiXML 
= new YpiXML(projekt);
 
  ypiXML.setFile(outFile);  
ypiXML.saveProjektDaten(doc, true);
 
 OutputStream xmlstream = new 
ByteArrayOutputStream(); ByteArrayInputStream istream = 
null; String s = ""; OutputFormat outFormat = new 
OutputFormat(); outFormat.setEncoding("windows-1252"); XMLWriter 
writer = new 
XMLWriter(xmlstream,outFormat); writer.write(doc); writer.flush(); s 
= xmlstream.toString(); stream = new 
ByteArrayInputStream(s.getBytes());String stemp = 
istream.toString(); istream.close();Source strSource = new 
StreamSource(new StringReader(s));TransformerFactory transformerFactory 
= TransformerFactory.newInstance ();  Templates template = 
transformerFactory.newTemplates(new StreamSource(xslFile));Transformer 
transformer = template.newTransformer();Driver driver = new 
Driver();driver.setRenderer(driver.RENDER_PDF);FileOutputStream fo = 
new FileOutputStream(outFile);driver.setOutputStream(fo);Result 
saxResult = new SAXResult( driver.getContentHandler() 
);transformer.transform( strSource, saxResult );
driver.reset();fo.flush();fo.close();}

  This works very 
  well, i only have to provide an xsl File that contains the information, 
  which data of the xml file should be shown in the 
  pdf.
  when a table 
  larger than one pdf (A4) page has to be created, the endless loop appears. 
  otherwise it runs with no problem...
   
  As i am really new 
  to FOP, any hints are welcome,
   
  regards, 
  
   
  T. 
  Kuhn
   
   -Ursprüngliche 
  Nachricht-Von: J.Pietschmann [mailto:[EMAIL PROTECTED]] 
  Gesendet: Montag, 30. September 2002 21:53An: 
  [EMAIL PROTECTED]Betreff: Re: AW: large tables loop 
  problem
  Tobias Kuhn wrote: > This is 
  the part of the code creating the tables which will not fit in 
  > one page in some cases... 
  I can't reproduce the problem. 
  Posting snippets form the XSLT is unwise, you should 
  post the result of the XSL transformation, after 
  trimming it to the part which actually 
  demonstrates the problem, and perhaps anonymizing 
  company data. 
  I guess you'll spot the problem yourself when 
  looking at the XSLT result. 
  J.Pietschmann 
  - 
  To unsubscribe, e-mail: 
  [EMAIL PROTECTED] For additional 
  commands, email: [EMAIL PROTECTED] 
  


AW: AW: large tables loop problem

2002-10-02 Thread Tobias Kuhn
Title: Nachricht



Hello,
 
i 
don't know how to view my xslt result.
i am 
working on a project , where all the data of the software can be saved to 
xml...
now i 
want to create a pdf report file out of the xml data, and i only provide and xsl 
file with FO tags.
so i 
have written a java class with the following code:
 
{
// create XML Tree with project data
  
Document doc = 
DocumentFactory.getInstance().createDocument();  YpiXML ypiXML = 
new YpiXML(projekt);
 
  
ypiXML.setFile(outFile);  ypiXML.saveProjektDaten(doc, 
true);
 
 OutputStream xmlstream = new 
ByteArrayOutputStream(); ByteArrayInputStream istream = 
null; String s = ""; OutputFormat outFormat = new 
OutputFormat(); outFormat.setEncoding("windows-1252"); XMLWriter 
writer = new 
XMLWriter(xmlstream,outFormat); writer.write(doc); writer.flush(); s 
= xmlstream.toString(); stream = new 
ByteArrayInputStream(s.getBytes());String stemp = 
istream.toString(); istream.close();Source strSource = new 
StreamSource(new StringReader(s));TransformerFactory transformerFactory = 
TransformerFactory.newInstance ();  Templates template = 
transformerFactory.newTemplates(new StreamSource(xslFile));Transformer 
transformer = template.newTransformer();Driver driver = new 
Driver();driver.setRenderer(driver.RENDER_PDF);FileOutputStream fo = new 
FileOutputStream(outFile);driver.setOutputStream(fo);Result saxResult = 
new SAXResult( driver.getContentHandler() );transformer.transform( 
strSource, saxResult );
driver.reset();fo.flush();fo.close();}

  This works very well, 
  i only have to provide an xsl File that contains the information, which data 
  of the xml file should be shown in the pdf.
  when a table larger 
  than one pdf (A4) page has to be created, the endless loop appears. otherwise 
  it runs with no problem...
   
  As i am really new to 
  FOP, any hints are welcome,
   
  regards, 
  
   
  T. 
  Kuhn
   
   -Ursprüngliche 
  Nachricht-Von: J.Pietschmann [mailto:[EMAIL PROTECTED]] 
  Gesendet: Montag, 30. September 2002 21:53An: 
  [EMAIL PROTECTED]Betreff: Re: AW: large tables loop 
  problem
  Tobias Kuhn wrote: > This is the 
  part of the code creating the tables which will not fit in > one page in some cases... 
  I can't reproduce the problem. 
  Posting snippets form the XSLT is unwise, you should 
  post the result of the XSL transformation, after 
  trimming it to the part which actually demonstrates 
  the problem, and perhaps anonymizing company 
  data. 
  I guess you'll spot the problem yourself when looking 
  at the XSLT result. 
  J.Pietschmann 
  - 
  To unsubscribe, e-mail: 
  [EMAIL PROTECTED] For additional 
  commands, email: [EMAIL PROTECTED] 



Re: AW: large tables loop problem

2002-09-30 Thread J.Pietschmann

Tobias Kuhn wrote:
> This is the part of the code creating the tables which will not fit in
> one page in some cases...

I can't reproduce the problem.

Posting snippets form the XSLT is unwise, you should post
the result of the XSL transformation, after trimming it
to the part which actually demonstrates the problem, and
perhaps anonymizing company data.

I guess you'll spot the problem yourself when looking
at the XSLT result.

J.Pietschmann


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




AW: large tables loop problem

2002-09-30 Thread Tobias Kuhn
Title: Nachricht



hi,
 
simply 
terminating the endless loop would be a good "first fix" of the problem for me 
too...
 
This 
is the part of the code creating the tables which will not fit in one page in 
some cases...
 
 

 

Aufwands- / Zeitplanung
fo:block>













PSP-Nr
fo:block>
fo:block>
fo:table-cell>


Typ
fo:block>
fo:block>
fo:table-cell>


Bezeichnung
fo:block>
fo:block>
fo:table-cell>


Anfang
(Plan)fo:block>
fo:block>
fo:table-cell>


Ende
(Plan)fo:block> 
fo:block>
fo:table-cell>


Aufwand
(Plan)fo:block>
fo:block>
fo:table-cell>


Kosten
(Plan)fo:block>
fo:block>
fo:table-cell> 
fo:table-row>
fo:table-header>




 
 
fo:block>
fo:table-cell>
 
fo:block>
fo:table-cell>
 
fo:block>
fo:table-cell>
 
fo:block>
fo:table-cell>
 
fo:block>
fo:table-cell>
 
fo:block>
fo:table-cell>
 
fo:block>
fo:table-cell>
fo:table-row> 
xsl:for-each> 
fo:table-body>
fo:table> 

  
  -Ursprüngliche Nachricht-Von: Rhett Aultman 
  [mailto:[EMAIL PROTECTED]] Gesendet: Montag, 30. September 
  2002 16:29An: [EMAIL PROTECTED]Betreff: RE: large 
  tables loop problem
  I'm 
  actually trying to shore up this from happening, but it won't address your 
  situation, since my patch simply terminates the endless loop rather than 
  necessarily finding and making splits more aggressively.
   
  Could you post a copy of the FO data that is triggering the endless 
  loop?  I'd like the opportunity to analyze it.  Putting in a bug in 
  Bugzilla and attaching some sample data there would be even 
  better.
  
-Original Message-From: Tobias Kuhn 
[mailto:[EMAIL PROTECTED]]Sent: Monday, September 
30, 2002 10:25 AMTo: [EMAIL PROTECTED]Subject: 
large tables loop problem
hello,
 
i successfully