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


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: 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 ifrendering 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


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: 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: large tables loop problem

2002-10-02 Thread Rhett Aultman
Title: Nachricht



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: 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] 
  


RE: large tables loop problem

2002-10-02 Thread Rhett Aultman
Title: Nachricht



You 
may have syntax in one of your two files that it doesn't like. You'll have 
to work with it and get it to work for you. Last I used XT, it at least 
listed the line number of the "bad character" so it shouldn't be too hard for 
you to figure out. When in doubt, read the documentation and/or email the 
author. I cannot give you tech support for XT.

Or try 
a different XSLT engine. Here's a list of them: http://www.xslt.com/xslt_tools_engines.htm

  -Original Message-From: Tobias Kuhn 
  [mailto:[EMAIL PROTECTED]]Sent: Wednesday, October 
  02, 2002 10:26 AMTo: [EMAIL PROTECTED]Subject: AW: 
  large tables loop problem
  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] 
  


large tables loop problem

2002-09-30 Thread Tobias Kuhn
Title: Nachricht



hello,

i successfully embed 
tables in my created pdf File using fop 
version20.4
now i got the 
problem of an endless loop when a table is bigger than one page and it does no 
fit on one page any more

any ideas how i can 
deal with this problem? automatically split a table correctto the next 
page
it would be no 
problem for me if the table ends "abrupt" and just starts on the next page 
without a headline or so..
i read a lot of this 
in fop-dev and fop-user but i did not find any solution...

Many 
regards,

Tobias 
Kuhn


RE: large tables loop problem

2002-09-30 Thread Rhett Aultman
Title: Nachricht



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 
  embed tables in my created pdf File using fop 
  version20.4
  now i got the 
  problem of an endless loop when a table is bigger than one page and it does no 
  fit on one page any more
  
  any ideas how i 
  can deal with this problem? automatically split a table correctto the 
  next page
  it would be no 
  problem for me if the table ends "abrupt" and just starts on the next page 
  without a headline or so..
  i read a lot of 
  this in fop-dev and fop-user but i did not find any 
  solution...
  
  Many 
  regards,
  
  Tobias 
  Kuhn


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...



!-- ANFANG TABLE "AUFWANDS-  
ZEITPLANUNG" -- 
fo:block 
space-before.optimum="2cm" space-after="0.75cm" font-style="italic" font-size="20pt" keep-together="always"
Aufwands- / Zeitplanung
/fo:block
fo:table 
table-omit-header-at-break="true" table-layout="fixed"
fo:table-column 
column-width="2cm"/
fo:table-column 
column-width="1cm"/
fo:table-column 
column-width="4cm"/
fo:table-column 
column-width="3cm"/
fo:table-column 
column-width="3cm"/
fo:table-column 
column-width="2cm"/
fo:table-column 
column-width="2cm"/

fo:table-header
fo:table-row
fo:table-cell 
background-color="#F7F24D"
fo:block font-weight="bold" text-align="center" 
vertical-align="middle"
border-width="1pt" 
border-color="black" background-color="#F7F24D" font-size="10pt"
PSP-Nr
fo:block background-color="#F7F24D" font-size="10pt"xsl:value-of select="leer" //fo:block
/fo:block
/fo:table-cell
fo:table-cell 
background-color="#F7F24D"
fo:block font-weight="bold" text-align="center" 
vertical-align="middle"
border-width="1pt" 
border-color="black" background-color="#F7F24D" font-size="10pt"
Typ
fo:block background-color="#F7F24D" font-size="10pt"xsl:value-of select="leer" //fo:block
/fo:block
/fo:table-cell
fo:table-cell 
background-color="#F7F24D"
fo:block font-weight="bold" text-align="center" 
vertical-align="middle"
border-width="1pt" 
border-color="black" background-color="#F7F24D" font-size="10pt"
Bezeichnung
fo:block background-color="#F7F24D" font-size="10pt"xsl:value-of select="leer" //fo:block
/fo:block
/fo:table-cell
fo:table-cell
fo:block font-weight="bold" text-align="center" 
vertical-align="middle"
border-width="1pt" 
border-color="black" background-color="#F7F24D" font-size="10pt"
Anfang
fo:block background-color="#F7F24D" font-size="10pt"(Plan)/fo:block
/fo:block
/fo:table-cell
fo:table-cell
fo:block font-weight="bold" text-align="center" 
vertical-align="middle"
border-width="1pt" 
border-color="black" background-color="#F7F24D" font-size="10pt"
Ende
fo:block background-color="#F7F24D" font-size="10pt"(Plan)/fo:block 
/fo:block
/fo:table-cell
fo:table-cell
fo:block font-weight="bold" text-align="center" 
vertical-align="middle"
border-width="1pt" 
border-color="black" background-color="#F7F24D" font-size="10pt"
Aufwand
fo:block background-color="#F7F24D" font-size="10pt"(Plan)/fo:block
/fo:block
/fo:table-cell
fo:table-cell
fo:block font-weight="bold" text-align="center" 
vertical-align="middle"
border-width="1pt" 
border-color="black" background-color="#F7F24D" font-size="10pt"
Kosten
fo:block background-color="#F7F24D" font-size="10pt"(Plan)/fo:block
/fo:block
/fo:table-cell 
/fo:table-row
/fo:table-header

fo:table-body
xsl:for-each select="/projekt/projektstruktur/planzeile"
xsl:sort select="id" order="ascending" data-type="number"/
fo:table-row 
fo:table-cell 
fo:block font-size="10pt" text-align="center" 
space-before="0.25cm"xsl:value-of 
select="pspnr" //fo:block
/fo:table-cell
fo:table-cell 
fo:block font-size="10pt" text-align="center" 
space-before="0.25cm"xsl:value-of 
select="typ" 
//fo:block
/fo:table-cell
fo:table-cell 
fo:block font-size="10pt" text-align="center" 
space-before="0.25cm"xsl:value-of 
select="bezeichnung" //fo:block
/fo:table-cell
fo:table-cell 
fo:block font-size="10pt" text-align="center" 
space-before="0.25cm"xsl:value-of 
select="plananfang" //fo:block
/fo:table-cell
fo:table-cell 
fo:block font-size="10pt" text-align="center" 
space-before="0.25cm"xsl:value-of 
select="planende" //fo:block
/fo:table-cell
fo:table-cell 
fo:block font-size="10pt" text-align="center" 
space-before="0.25cm"xsl:value-of 
select="planaufwand" //fo:block
/fo:table-cell
fo:table-cel

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]