RE: Trying to resolve memory exception through correct use of pag e sequencing
Excellent thanks J. -Original Message- From: J.Pietschmann [mailto:[EMAIL PROTECTED] Sent: 02 May 2002 21:39 To: [EMAIL PROTECTED] Subject: Re: Trying to resolve memory exception through correct use of pag e se quencing John Bourke wrote: J. below is my layout-master-set followed by the way I start the page sequence for my repeatable page. fo:page-sequence-master master-name=reportDetails fo:repeatable-page-master-alternatives fo:conditional-page-master-reference master-name=detailPage blank-or-not-blank=not-blank/ /fo:repeatable-page-master-alternatives Here is the problem: You have a page master for non-blank pages, but none for blank pages. Somewhere you force a blank page, perhaps by break-before=page-even or something similar, and FOP falls over. Provide a page master for blank page, and this problem should go away. J.Pietschmann *** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. Any unauthorised distribution or copying is strictly prohibited. Whilst Cedar Plc takes steps to prevent the transmission of viruses via e-mail, we can not guarantee that any email or attachment is free from computer viruses and you are strongly advised to undertake your own anti-virus precautions. Cedar Plc grants no warranties regarding performance, use or quality of any e-mail or attachment and undertakes no liability for loss or damage, howsoever caused.
How do I stop table cell wrapping?
Guys is there a way to stop cells in a table wrapping the text to the next line and simply cutting the data if it's longer than the cell width? I would think there may be some kind of attribute to do this? *** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. Any unauthorised distribution or copying is strictly prohibited. Whilst Cedar Plc takes steps to prevent the transmission of viruses via e-mail, we can not guarantee that any email or attachment is free from computer viruses and you are strongly advised to undertake your own anti-virus precautions. Cedar Plc grants no warranties regarding performance, use or quality of any e-mail or attachment and undertakes no liability for loss or damage, howsoever caused.
Re: How do I stop table cell wrapping?
You can do that whith the attribute wrap-option set to no-wrap like this : fo:table-cell fo:block wrap-option=no-wrap /fo:block fo:table-cell - Original Message - From: John Bourke [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, May 03, 2002 10:45 AM Subject: How do I stop table cell wrapping? Guys is there a way to stop cells in a table wrapping the text to the next line and simply cutting the data if it's longer than the cell width? I would think there may be some kind of attribute to do this? *** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. Any unauthorised distribution or copying is strictly prohibited. Whilst Cedar Plc takes steps to prevent the transmission of viruses via e-mail, we can not guarantee that any email or attachment is free from computer viruses and you are strongly advised to undertake your own anti-virus precautions. Cedar Plc grants no warranties regarding performance, use or quality of any e-mail or attachment and undertakes no liability for loss or damage, howsoever caused.
RE: How do I stop table cell wrapping?
Thanks Stephane I really appreciate that! -Original Message- From: Stéphane REYNIER [mailto:[EMAIL PROTECTED] Sent: 03 May 2002 10:16 To: [EMAIL PROTECTED] Subject: Re: How do I stop table cell wrapping? You can do that whith the attribute wrap-option set to no-wrap like this : fo:table-cell fo:block wrap-option=no-wrap /fo:block fo:table-cell - Original Message - From: John Bourke [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, May 03, 2002 10:45 AM Subject: How do I stop table cell wrapping? Guys is there a way to stop cells in a table wrapping the text to the next line and simply cutting the data if it's longer than the cell width? I would think there may be some kind of attribute to do this? *** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. Any unauthorised distribution or copying is strictly prohibited. Whilst Cedar Plc takes steps to prevent the transmission of viruses via e-mail, we can not guarantee that any email or attachment is free from computer viruses and you are strongly advised to undertake your own anti-virus precautions. Cedar Plc grants no warranties regarding performance, use or quality of any e-mail or attachment and undertakes no liability for loss or damage, howsoever caused.
AW: Problem after generating PDF
Hi! In my case, the following code worked: import java.io.*; import java.util.*; import org.xml.sax.InputSource; import org.xml.sax.XMLReader; import org.apache.fop.apps.Driver; import org.apache.fop.apps.Version; import org.apache.fop.apps.InputHandler; import org.apache.fop.apps.XSLTInputHandler; //import org.apache.log.*; public class generatePDF { public String Publish(String XMLfile, String XSLfile, String outFile) throws Exception { File MyXMLfile = new File(XMLfile); File MyXSLfile = new File(XSLfile); FileOutputStream MyOutputFile = new FileOutputStream(outFile); try { Driver driver = new Driver(); driver.setRenderer(Driver.RENDER_PDF); InputHandler inputHandler = new XSLTInputHandler(MyXMLfile, MyXSLfile); XMLReader parser = inputHandler.getParser(); driver.setOutputStream(MyOutputFile); driver.render(parser, inputHandler.getInputSource()); MyOutputFile.close(); } catch (Exception ex) { System.out.println(ex); } return built + outFile; } } Hope this helped you out, Tobi -Ursprüngliche Nachricht- Von: Ingo Peter [mailto:[EMAIL PROTECTED] Gesendet: Freitag, 3. Mai 2002 12:11 An: [EMAIL PROTECTED] Betreff: Problem after generating PDF Hi, I use fop embedded to generate pdf-files and it works very fine. But after generating the pdf, I have to close my java-application, because the the outputfile is still open. If I don't close my application acrobat tells me a locking-error. I use the example for empedding from apache: Driver driver = new Driver(); driver.setRenderer(Driver.RENDER_PDF); InputHandler inputHandler = new XSLTInputHandler(xmlFile, xslFile); XMLReader parser = inputHandler.getParser(); driver.setOutputStream(new FileOutputStream(outFile)); driver.render(parser, inputHandler.getInputSource()); Is there any command to close the outputfile? thanks IP
Re: Problem after generating PDF
[..] Driver driver = new Driver(); driver.setRenderer(Driver.RENDER_PDF); InputHandler inputHandler = new XSLTInputHandler(xmlFile, xslFile); XMLReader parser = inputHandler.getParser(); / changes start here / FileOutputStream fos = FileOutputStream( outFile ); driver.setOutputStream( fos ); driver.render(parser, inputHandler.getInputSource()); fos.close(); / changes end here / Is that what you need? Ralf
Best coding practice.
Hi, Is there is any best practice for coding the XSL:FO, that is always 1. use xsl:template 2. check whether the element exist or not even for mandatory elements. My xsl is of 578 lines,Suddenly i felt that my code is not object oriented beacuse no where i have used xsl:template. I construct the PDF line after line.Does this affect the processing speed. Does using xsl:template increases the processing speed. Please comment. Regards Balaji http://messenger.yahoo.com.au - Yahoo! Messenger - A great way to communicate long-distance for FREE!
AW: Best coding practice.
Hello Balaji, I think if you don't use any xsl:template match=..., then the processing speed would be fastest, since the XSLT has nothing much to do just to write out what you have. If it is good practice is another story... Greetings, Patrick Dipl. Inform. Patrick Chaumette T-Systems ITS GmbH Service Prozesse Retail Hausanschrift: Fasanenweg 9, 70771 Leinfelden-Echterdingen Postanschrift: Postfach 100258, 70746 Leinfelden-Echterdingen Telefon: (0711)972-2437 Telefax: (0711)972-1949 E-Mail: [EMAIL PROTECTED] Internet: http://www.t-systems.de -Ursprüngliche Nachricht- Von: Balaji Loganathan [mailto:[EMAIL PROTECTED] Gesendet: Freitag, 3. Mai 2002 16:30 An: [EMAIL PROTECTED] Betreff: Best coding practice. Hi, Is there is any best practice for coding the XSL:FO, that is always 1. use xsl:template 2. check whether the element exist or not even for mandatory elements. My xsl is of 578 lines,Suddenly i felt that my code is not object oriented beacuse no where i have used xsl:template. I construct the PDF line after line.Does this affect the processing speed. Does using xsl:template increases the processing speed. Please comment. Regards Balaji http://messenger.yahoo.com.au - Yahoo! Messenger - A great way to communicate long-distance for FREE!
Re: Best coding practice.
Balaji, xsl:template mainly helps you split up your processing in handy parts that may even be reused instead of copy-pasted. Copy-Paste is often A Bad Thing (TM). That's probably one of the top ten best practices in every computer language. Processing speed is always one thing. Maintainability of code and code reuse are another. Sometimes they contradict each other. It does not always make sense to go for speed over maintenance costs. In the past I've often went for lower maintenance cost and it has almost always paid off. What I want to say is this: If you're doing quite a lot of XSLT you should learn how to work with templates. It will make life easier. As Patrick said xsl:template with a match attribute (probably!) won't be so fast, but a named template (xsl:template name=xy...) should be relatively fast. But don't take that as a definitive rule. Some things may be faster with one implementation of XSLT, slower with another. I know some people who have always asked for definitive and simple rules, but often they don't exist. Often you have to try something out and measure the performance. Then you change it if it's not good enough and measure again. Experimenting can help you get a feel on how fast certain things are. As for checking for mandatory elements there are several points to consider: - Structure checking (or in other words: Validation) is for DTDs and XML Schemas and the like... - ..., normally. You can of course let this checking code in your XSLT, but as soon as you're in production and you can rely on getting valid XML those checks are not really necessary. - If you have an unreliable source of XML (for example many different producers sending you XML Files of the Internet) then it's probably best to use XML Schema or DTD validation. My suggestion to you: Measure the performance of your current XSLT, then read into xsl:template and do a refactoring cycle structuring the code into handy parts using xsl:template, then measure again and decide which one of those two approaches you like more using the criterias: Speed, maintanability and possibility of code reuse. On 03.05.2002 16:29:35 Balaji Loganathan wrote: Hi, Is there is any best practice for coding the XSL:FO, that is always 1. use xsl:template 2. check whether the element exist or not even for mandatory elements. My xsl is of 578 lines,Suddenly i felt that my code is not object oriented beacuse no where i have used xsl:template. I construct the PDF line after line.Does this affect the processing speed. Does using xsl:template increases the processing speed. Please comment. Regards Balaji Cheers, Jeremias Maerki
Re: Basic-link problem in JSPs
Ralf Steppacher wrote: OK, I got rid of all the d-o-e. But the basic-links still are not present in the pdf generated by the embedded FOP but are if the .fo document is dumped to a file and then rendered using FOP from commandline. Can you post a trimmed down version of your source XML and the style sheet which demonstrates the problem? J.Pietschmann
Re: How do I stop table cell wrapping?
John Bourke wrote: Guys is there a way to stop cells in a table wrapping the text to the next line and simply cutting the data if it's longer than the cell width? I would think there may be some kind of attribute to do this? You probably want to use the overflow=clip property too, unfortunately, it isn't implemented yet in FOP. You'll have to clip at the XSLT level. There are various apporaches in the XSL list archive. J.Pietschmann
Re: Best coding practice.
Balaji Loganathan wrote: Hi, Is there is any best practice for coding the XSL:FO, that is always 1. use xsl:template 2. check whether the element exist or not even for mandatory elements. My xsl is of 578 lines,Suddenly i felt that my code is not object oriented beacuse no where i have used xsl:template. I construct the PDF line after line.Does this affect the processing speed. Does using xsl:template increases the processing speed. Please comment. For a start, you should be aware that you actually ask for coding XSLT, not XSLFO. They aren't the same things at all, even though they are usually used toghether. Another hint: using xsl:template has nothing to do with object orientation. XSLT is mainly a declarative language, the concept of object orientatitation is only relevant for advanced topics. However, using xsl:template usually makes transformations more robust, flexible, modular and easier to maintain. Regarding performance, using xsl:template will not improve processing speed. It will be slightly slower due to matching overhead, however, processors are specifically optimized for doing this, so there is no measurable performance loss from using xsl:template unless you have literally thousands of templates or hundreds of very badly designed templates. J.Pietschmann
RE: How do I stop table cell wrapping?
I seem to recall that the fo:block wrap-option=wrap | no-wrap attribute works in cells. -Original Message- From: J.Pietschmann [mailto:[EMAIL PROTECTED] Sent: Friday, May 03, 2002 4:12 PM To: [EMAIL PROTECTED] Subject: Re: How do I stop table cell wrapping? John Bourke wrote: Guys is there a way to stop cells in a table wrapping the text to the next line and simply cutting the data if it's longer than the cell width? I would think there may be some kind of attribute to do this? You probably want to use the overflow=clip property too, unfortunately, it isn't implemented yet in FOP. You'll have to clip at the XSLT level. There are various apporaches in the XSL list archive. J.Pietschmann
Re: Blank pages
Ralf Steppacher wrote: I wonder how I can procude legal empty pages (and then suppress them)? Forced blank pages are mainly created by page count constraints, for example a break-before=odd-page will insert a page break, and if the new page has an even page number, a blank page is inserted, and the flow continues on an odd page. You can also get blank pages by forcing page sequence to have an odd or even number of pages or to end with an odd or even page number by using the force-page-count property. I think there are a few more possibilities. You can define a page master specifically for blank pages in order to omit the usual headers and footers on such pages. You can use it also for creating This page is intentionally left blank markers and such stuff. Can I achieve an empty page not to be rendered? This could depend on what you mean by empty page. But i don't think so anyway. J.Pietschmann
RE: How do I stop table cell wrapping?
Now I get the whole picture thanks, -Original Message- From: J.Pietschmann [mailto:[EMAIL PROTECTED] Sent: Friday, May 03, 2002 5:20 PM To: [EMAIL PROTECTED] Subject: Re: How do I stop table cell wrapping? Matthew L. Avizinis wrote: I seem to recall that the fo:block wrap-option=wrap | no-wrap attribute works in cells. Yes, it works. However, if the content is too large for the cell, it will visibly overflow into whatever is further in inline progression direction (read: table cells to the right). The standard provides the property overflow=hidden (not =clip, sorry) to clip the overflowing content, and this doesn't work in FOP, at least for rendering PDF. J.Pietschmann