RE: URGENT - Adding dynamic, non file system images into a pdf do cume nt.
Jeremias, thank you so much for your help. I've included the java files within my project and have specified the change to the jvm. I added some System.out.println traces into both files, but they just don't seem to run from within the cocoon-2.0.4 sitemap when serialization occurs. Everything that you suggested seems spot-on to me, but the pdf files still serialize huge and the handler doesn't seem to get a chance to do its thing. I may have done something wrong, but I don't think so... I am unsure what else to try. Do you know if perhaps a change needs to be made to my serializer configuration to force the use of the replacement protocol? map:serializer name=fo2pdf src=org.apache.cocoon.serialization.FOPSerializer logger=sitemap.serializer.fo2pdf mime-type=application/pdf user-configfop-config.xml/user-config /map:serializer Any thoughts will be greatly appreciated. Craig Burlock. -Original Message- From: Jeremias Maerki [mailto:[EMAIL PROTECTED] Sent: Saturday, 19 February 2005 6:26 AM To: [EMAIL PROTECTED] Subject: Re: URGENT - Adding dynamic, non file system images into a pdf docume nt. Craig, I've just come back from the lots.ch conference today and I had some time in the train to write that protocol handler I was talking about (for the data: protocol). Find the sources here: http://cvs.apache.org/~jeremias/datahandler.zip To make it work you have to put them somewhere in your project (or in FOP and recompile) and specify the following system property for the virtual machine: -Djava.protocol.handler.pkgs=org.apache.fop.util.protocols Adjust accordingly if you change the package names. The implementations defers to Batik's implementation of RFC2397 as I hinted would be possible. On 17.02.2005 06:14:27 Burlock, Craig (SAPOL) wrote: I'm trying to produce a pdf document that contains dynamically generated jpeg images. The images are available within the session. I'm using a cocoon pipline match to serialise xsl-fo into pdf documents. I've explored the following options: 1.) Creating a cocoon servlet to stream back the image data. This work fine for images within HTML document. When I reference the servlet from an xsl-fo image source, my session is unavailable and only a new session accessible. 2.) Create a cocoon generator to turn jpeg image binary into a base64 encoded string and embed this string within an instream-foreign-object using svg. This method produces visible images, but the final pdf document is huge. It's like the jpeg compression is being translated into an uncompressed bitmap. fo:instream-foreign-object content-type=content-type:image/jpeg svg:svg height=176mm width=277mm svg:image width=277mm height=176mm x=0 y=0 xlink:href=data:image/jpeg;base64, /9j/4AAQSkZJRgABAQAAAQAgLCgoL . . . . / /svg:svg /fo:instream-foreign-object I've already spent too much time trying to get this working. I've found some references to this type of issue in other mail archives, but the responses I've seen have been very vague. I'll be forced to drop using pdf reports and use ugly html if I can't resolve this very soon. If anyone has a solution that they have tried, please let me know. I'd hate to abandon fop and produce nasty html reports after getting this far! Please help Craig. Jeremias Maerki - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: URGENT - Adding dynamic, non file system images into a pdf do cume nt.
Sounds like a class loader problem. I didn't think about you're using Cocoon which is complicating things a bit. I think the protocol handler is not found by the JDK because your JAR is in a custom class loader created by Cocoon. So we must ensure that the classes are available higher up in the hierarchy. The following should work: 1. Put the two new classes in their own ZIP. 2. Copy this ZIP to Cocoon's endorsed directory. 3. Move batik.jar from Cocoon's lib/optional dir to Cocoon's endorsed directory. That's if you're starting Cocoon from the command-line. If you embed it in Tomcat for example, you should put the two JARs in to Tomcat's common/endorsed directory. You could also put it in your JDK's jre/lib/endorsed directory. Sorry, if this may be a bit complicated but it's the easiest/quickest way to make sure that the protocol handler is available to java.net.URL. On 21.02.2005 03:43:40 Burlock, Craig (SAPOL) wrote: Jeremias, thank you so much for your help. I've included the java files within my project and have specified the change to the jvm. I added some System.out.println traces into both files, but they just don't seem to run from within the cocoon-2.0.4 sitemap when serialization occurs. Everything that you suggested seems spot-on to me, but the pdf files still serialize huge and the handler doesn't seem to get a chance to do its thing. I may have done something wrong, but I don't think so... I am unsure what else to try. Do you know if perhaps a change needs to be made to my serializer configuration to force the use of the replacement protocol? map:serializer name=fo2pdf src=org.apache.cocoon.serialization.FOPSerializer logger=sitemap.serializer.fo2pdf mime-type=application/pdf user-configfop-config.xml/user-config /map:serializer Any thoughts will be greatly appreciated. Jeremias Maerki - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problem with report tail
Miroslav Pukhalsky wrote: Hi! Chris Bowditch wrote: If you need to ensure content is always placed at the bottom of the last page, then I suggest you try putting this content into a fo:footnote. Sorry, but footnotes not workin properly. If body has more than one page, footnote prints on the first page, but footnote inline there is after body. I dont understand what you mean. If you insert footnote at end of body, then footnote should appear on last page that content spills onto. Are you sure you are putting the footnote at end of your content? Chris - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
repeating column cell
Hello everyone, I'm new to this foum so I wish to say hello to everyone ;) Here is my problem: I've got a table with 2 colums. The first colum is a title (kind of header) and the second column contains a lot of text of unknown size. The text in the second coloumn can be so big that it can overlap several pages. I would like to have the title of the first column to repeat itself from page to page Example: page 1: title1 | text 1 | title2 | begining of | | text 2 | | | page 2: title2 | end of | | text 2 | title3 | begining of | | text 3 | | | page 3: title3 | | | middle of | | text 3 | | | page 4: title3 | end of | | text 3 | title4 | text 4 | etc.. How cab I do that? thx to all ;) Jack - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Printing PDF with background image
Jeremias Maerki wrote: On 18.02.2005 11:18:21 Chris Bowditch wrote: Java 1.5, also has support for printing PDFs. Although other users on this list have reported problems rendering XSL-FO using FOP on JDK 1.5 Others may know of other tools that can be used to print a PDF That Java 1.5 has PDF printing support is only a rumour, I'm afraid. I've heard that myself and went looking for it. Found nothing. Some of the packages found following the link above claim to support a JPS (Java Printing System) plug-in that allows to print PDF, however. D'oh! You are right. I saw someone post some code a while ago and just assumed it would work on 1.5, I never actually tried it. JPS allows to print arbitrary objects, although each print service only supports a certain subset of DocFlavors. See the attached jdk15JPSEnum.txt which is a log of the JPSEnum.java I've also attached. It shows what JPS printing services (streaming and non-streaming) are available on my system under JDK 1.5. BTW, JPS is included in JDK 1.4! Yes I know JPS is available on 1.4, I just thought the PDF print service had been provided in 1.5. snip/ Further down you can see the streaming print services. JDK 1.4 and 1.5 support generation of PostScript files. Sun created a Graphics2D subclass which allows that. Similar to FOP's PSGraphics2D. Speaking of which: Just below that entry you can see two print services that I wrote as a proof of concept which add PDF and PS output support to JPS by delegating to FOP's PSGraphics2D and PDFGraphics2D. This would allow any Java application to generate PDF files via JPS with FOP. Thanks for the info/code, Jeremias. Chris - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
first and last pages timings...
Hi, In the pdf generation process, I found that first and last pages are taking much time than the others. What is the reason? Thanks Regards, Chandu Confidentiality Notice The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain confidential or privileged information. If you are not the intended recipient, please notify the sender at Wipro or [EMAIL PROTECTED] immediately and destroy all copies of this message and any attachments.
XSLT Question
Hello, I know this is not quite the right mailing list for that question, but maybe somebody here knows? I need to create a kind of recursive call-template, where certain attributes from different parent elements are needed. I want to do a call to a template by itself, giving it the parent element as parameter. Ho can I evaluate the parent of a parameter given node? Or how do I set a parent element to be current() element? While in a call? Regards, Kai - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: XSLT Question
Hi, Kai, I would need a bit more detail to be able to help with that. Please post the smallest (but still still complete) set of XML files (input and desired output) that you want. That way, we can see what you mean. A couple observations, though: You can't walk back up the tree from a parameter passed to a template by using path expressions. Thus, you can't get the parent of a node you passed as a parameter by using .. or a similar construct. If memory serves, this problem arises because, when you pass a path as a parameter, you really pass a result tree fragment. Unfortunately, the result tree fragment has its own root node (the node you passed), so you can't go up from there. To solve this problem, you need more information. In the past, I have used a text representation of the full path (from the document root) to the node I want. Then I can use the name() function and predicate logic to walk back up the path. If you only need to go up one level, you could pass the parent node as another parameter. That method is not extensible, but it will work, so long as you really only need to go up one level. Also, you should subscribe to [EMAIL PROTECTED] and ask that question there. The heavy hitters in the XSL world read that list. HTH Jay Bryant Bryant Communication Services (presently consulting at Synergistic Solution Technologies) Kai Hackemesser [EMAIL PROTECTED] 02/21/2005 09:27 AM Please respond to [EMAIL PROTECTED] To [EMAIL PROTECTED] cc Subject XSLT Question Hello, I know this is not quite the right mailing list for that question, but maybe somebody here knows? I need to create a kind of recursive call-template, where certain attributes from different parent elements are needed. I want to do a call to a template by itself, giving it the parent element as parameter. Ho can I evaluate the parent of a parameter given node? Or how do I set a parent element to be current() element? While in a call? Regards, Kai - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: XSLT Question
Hi, Jay, ok, here more details: my XML source looks like that: ... object Level=0 relation Level=0 object Level=1 relation Level=1 object Level=2 ... /object /relation /object object Level=1 relation Level=1 object Level=2 ... I think you got the structure. There are attribute elements and a lot of element attributes I now haven't shown because not needed for my question. I have to create a explorer tree like picture from that. For each line of my list I need to find out what tree structure images are needed (u2503; u2523; u2517; in form of fixed size gif images), I need to know for example if this element is the last child of its parent, if the parent is the last child of its parent and so on, to decide which image is the correct. I need it recursive because there is theoretical no limit of depth, practical it would lie at about ten. My solution was about this: xsl:template match=object tr td xsl:call-template name=tree-scructure xsl:with-param name=treenode select=node()/ /xsl:call-template xsl:value-of select=[EMAIL PROTECTED]'DisplayedName']/value/ /td td xsl:call-template name=replace-null xsl:with-param name=input select=[EMAIL PROTECTED]'beGTABeschreibPos']/value/ /xsl:call-template /td td xsl:value-of select=attribute [EMAIL PROTECTED]'LifeCycleState']/value/ /td td xsl:value-of select=[EMAIL PROTECTED]'ProjectName']/value/ /td /tr xsl:apply-templates select=relation/ /xsl:template xsl:template match=relation tr td xsl:call-template name=tree-scructure xsl:with-param name=treenode select=node()/ /xsl:call-template xsl:value-of select=[EMAIL PROTECTED]'LDisplayedName']/value/ /td /tr xsl:apply-templates select=object/ /xsl:template xsl:template name=tree-scructure xsl:param name=treenode/ xsl:param name=recursive/ xsl:if test=$treenode/@Level 0 xsl:call-template name=tree-scructure xsl:with-param name=treenode select=parent::node()/ xsl:with-param name=recursivetrue/xsl:with-param /xsl:call-template /xsl:if img width=16 height=16 alt=just an incomplete test/ /xsl:template That's where I am now a not working thing. Thank you for your time, Kai Hi, Kai, I would need a bit more detail to be able to help with that. Please post the smallest (but still still complete) set of XML files (input and desired output) that you want. That way, we can see what you mean. A couple observations, though: You can't walk back up the tree from a parameter passed to a template by using path expressions. Thus, you can't get the parent of a node you passed as a parameter by using .. or a similar construct. If memory serves, this problem arises because, when you pass a path as a parameter, you really pass a result tree fragment. Unfortunately, the result tree fragment has its own root node (the node you passed), so you can't go up from there. To solve this problem, you need more information. In the past, I have used a text representation of the full path (from the document root) to the node I want. Then I can use the name() function and predicate logic to walk back up the path. If you only need to go up one level, you could pass the parent node as another parameter. That method is not extensible, but it will work, so long as you really only need to go up one level. Also, you should subscribe to [EMAIL PROTECTED] and ask that question there. The heavy hitters in the XSL world read that list. HTH Jay Bryant Bryant Communication Services (presently consulting at Synergistic Solution Technologies) Kai Hackemesser [EMAIL PROTECTED] 02/21/2005 09:27 AM Please respond to [EMAIL PROTECTED] To [EMAIL PROTECTED] cc Subject XSLT Question Hello, I know this is not quite the right mailing list for that question, but maybe somebody here knows? I need to create a kind of recursive call-template, where certain attributes from different parent elements are needed. I want to do a call to a template by itself, giving it the parent element as parameter. Ho can I evaluate the parent of a parameter given node? Or how do I set a parent element to be current() element? While in a call? Regards, Kai - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: XSLT Question
Hi, Kai, I don't think you need to call a template for that. You can test for the characteristics of the node from within the matching template and get the image you need. Several xsl:when statements within an xsl:choose block should let you figure out which images to use when. For example, xsl:when test=generate-id(.)=generate-id(../*[last()]) will tell you whether the current node is the last child node of its parent. Also, to indent properly, you can read the Level attribute and put the appropriate number of indentation objects (blank table cells, spaces, whatever you use) before the image. J Kai Hackemesser [EMAIL PROTECTED] 02/21/2005 10:55 AM Please respond to [EMAIL PROTECTED] To [EMAIL PROTECTED] cc Subject Re: XSLT Question Hi, Jay, ok, here more details: my XML source looks like that: ... object Level=0 relation Level=0 object Level=1 relation Level=1 object Level=2 ... /object /relation /object object Level=1 relation Level=1 object Level=2 ... I think you got the structure. There are attribute elements and a lot of element attributes I now haven't shown because not needed for my question. I have to create a explorer tree like picture from that. For each line of my list I need to find out what tree structure images are needed (u2503; u2523; u2517; in form of fixed size gif images), I need to know for example if this element is the last child of its parent, if the parent is the last child of its parent and so on, to decide which image is the correct. I need it recursive because there is theoretical no limit of depth, practical it would lie at about ten. My solution was about this: xsl:template match=object tr td xsl:call-template name=tree-scructure xsl:with-param name=treenode select=node()/ /xsl:call-template xsl:value-of select=[EMAIL PROTECTED]'DisplayedName']/value/ /td td xsl:call-template name=replace-null xsl:with-param name=input select=[EMAIL PROTECTED]'beGTABeschreibPos']/value/ /xsl:call-template /td td xsl:value-of select=attribute [EMAIL PROTECTED]'LifeCycleState']/value/ /td td xsl:value-of select=[EMAIL PROTECTED]'ProjectName']/value/ /td /tr xsl:apply-templates select=relation/ /xsl:template xsl:template match=relation tr td xsl:call-template name=tree-scructure xsl:with-param name=treenode select=node()/ /xsl:call-template xsl:value-of select=[EMAIL PROTECTED]'LDisplayedName']/value/ /td /tr xsl:apply-templates select=object/ /xsl:template xsl:template name=tree-scructure xsl:param name=treenode/ xsl:param name=recursive/ xsl:if test=$treenode/@Level 0 xsl:call-template name=tree-scructure xsl:with-param name=treenode select=parent::node()/ xsl:with-param name=recursivetrue/xsl:with-param /xsl:call-template /xsl:if img width=16 height=16 alt=just an incomplete test/ /xsl:template That's where I am now a not working thing. Thank you for your time, Kai Hi, Kai, I would need a bit more detail to be able to help with that. Please post the smallest (but still still complete) set of XML files (input and desired output) that you want. That way, we can see what you mean. A couple observations, though: You can't walk back up the tree from a parameter passed to a template by using path expressions. Thus, you can't get the parent of a node you passed as a parameter by using .. or a similar construct. If memory serves, this problem arises because, when you pass a path as a parameter, you really pass a result tree fragment. Unfortunately, the result tree fragment has its own root node (the node you passed), so you can't go up from there. To solve this problem, you need more information. In the past, I have used a text representation of the full path (from the document root) to the node I want. Then I can use the name() function and predicate logic to walk back up the path. If you only need to go up one level, you could pass the parent node as another parameter. That method is not extensible, but it will work, so long as you really only need to go up one level. Also, you should subscribe to [EMAIL PROTECTED] and ask that question there. The heavy hitters in the XSL world read that list. HTH Jay Bryant Bryant Communication Services (presently consulting at Synergistic Solution Technologies) Kai Hackemesser [EMAIL PROTECTED] 02/21/2005 09:27 AM Please respond to [EMAIL PROTECTED] To [EMAIL PROTECTED] cc Subject XSLT Question Hello, I know this is not quite the right mailing list
fop error - Too many open files
[EMAIL PROTECTED] dbf]$ [EMAIL PROTECTED] dbf]$ fop.sh cat-scania.fo -pdf cat-scania.pdf -- Elton Simões Baptista elton at cipec com br Cipec Autopeças Ltda Fone: +55 19 3834.9817 [INFO] Using org.apache.xerces.parsers.SAXParser as SAX2 Parser [INFO] FOP 0.20.5 [INFO] Using org.apache.xerces.parsers.SAXParser as SAX2 Parser [INFO] building formatting object tree [INFO] setting up fonts [INFO] [1] [INFO] [2] [INFO] [1] [INFO] [2] [INFO] [3] [INFO] [4] [INFO] [5] [INFO] [6] [INFO] [7] [INFO] [8] [INFO] [9] [INFO] [10] [INFO] [11] [INFO] [12] [INFO] [13] [INFO] [14] [INFO] [15] [INFO] [16] [INFO] [17] [INFO] [18] [INFO] [19] [INFO] [20] [INFO] [21] [INFO] [22] [INFO] [23] [INFO] [24] [INFO] [25] [INFO] [26] [INFO] [27] [INFO] [28] [INFO] [29] [INFO] [30] [INFO] [31] [INFO] [32] [INFO] [33] [INFO] [34] [INFO] [35] [INFO] [36] [INFO] [37] [INFO] [38] [INFO] [39] [INFO] [40] [INFO] [41] [INFO] [42] [INFO] [43] [INFO] [44] [INFO] [45] [INFO] [46] [INFO] [47] [INFO] [48] [INFO] [49] [INFO] [50] [INFO] [51] [INFO] [52] [INFO] [53] [INFO] [54] [INFO] [55] [INFO] [56] [INFO] [57] [INFO] [58] [INFO] [59] [INFO] [60] [INFO] [61] [INFO] [62] [INFO] [63] [INFO] [64] [INFO] [65] [INFO] [66] [INFO] [67] [INFO] [68] [INFO] [69] [INFO] [70] [INFO] [71] [INFO] [72] [INFO] [73] [INFO] [74] [INFO] [75] [INFO] [76] [INFO] [77] [INFO] [78] [INFO] [79] [INFO] [80] [INFO] [81] [INFO] [82] [INFO] [83] [INFO] [84] [INFO] [85] [INFO] [86] [INFO] [87] [INFO] [88] [INFO] [89] [INFO] Parsing of document complete, stopping renderer [ERROR] Error while reading image file:/cipec/imagens/261255.jpg: Error while loading image file:/cipec/imagens/261255.jpg : class java.io.FileNotFoundException - /cipec/imagens/261255.jpg (Too many open files) [ERROR] Error while reading image file:/cipec/imagens/271148.jpg: Error while loading image file:/cipec/imagens/271148.jpg : class java.io.FileNotFoundException - /cipec/imagens/271148.jpg (Too many open files) [ERROR] Error while reading image file:/cipec/imagens/297754.jpg: Error while loading image file:/cipec/imagens/297754.jpg : class java.io.FileNotFoundException - /cipec/imagens/297754.jpg (Too many open files) [ERROR] Error while reading image file:/cipec/imagens/312216.jpg: Error while loading image file:/cipec/imagens/312216.jpg : class java.io.FileNotFoundException - /cipec/imagens/312216.jpg (Too many open files) [ERROR] Error while reading image file:/cipec/imagens/312217.jpg: Error while loading image file:/cipec/imagens/312217.jpg : class java.io.FileNotFoundException - /cipec/imagens/312217.jpg (Too many open files) [ERROR] Error while reading image file:/cipec/imagens/312218.jpg: Error while loading image file:/cipec/imagens/312218.jpg : class java.io.FileNotFoundException - /cipec/imagens/312218.jpg (Too many open files) [ERROR] Error while reading image file:/cipec/imagens/312219.jpg: Error while loading image file:/cipec/imagens/312219.jpg : class java.io.FileNotFoundException - /cipec/imagens/312219.jpg (Too many open files) [ERROR] Error while reading image file:/cipec/imagens/312220.jpg: Error while loading image file:/cipec/imagens/312220.jpg : class java.io.FileNotFoundException - /cipec/imagens/312220.jpg (Too many open files) [ERROR] Error while reading image file:/cipec/imagens/312221.jpg: Error while loading image file:/cipec/imagens/312221.jpg : class java.io.FileNotFoundException - /cipec/imagens/312221.jpg (Too many open files) [ERROR] Error in XObject : Error while loading image file:/cipec/imagens/261255.jpg : class java.io.FileNotFoundException - /cipec/imagens/261255.jpg (Too many open files) [ERROR] Error in XObject : Error while loading image file:/cipec/imagens/271148.jpg : class java.io.FileNotFoundException - /cipec/imagens/271148.jpg (Too many open files) [ERROR] Error in XObject : Error while loading image file:/cipec/imagens/297754.jpg : class java.io.FileNotFoundException - /cipec/imagens/297754.jpg (Too many open files) [ERROR] Error in XObject : Error while loading image file:/cipec/imagens/312216.jpg : class java.io.FileNotFoundException - /cipec/imagens/312216.jpg (Too many open files) [ERROR] Error in XObject : Error while loading image file:/cipec/imagens/312217.jpg : class java.io.FileNotFoundException - /cipec/imagens/312217.jpg (Too many open files) [ERROR] Error in XObject : Error while loading image file:/cipec/imagens/312218.jpg : class java.io.FileNotFoundException - /cipec/imagens/312218.jpg (Too many open files) [ERROR] Error in XObject : Error while loading image file:/cipec/imagens/312219.jpg : class java.io.FileNotFoundException - /cipec/imagens/312219.jpg (Too many open files) [ERROR] Error in XObject : Error while loading image file:/cipec/imagens/312220.jpg : class java.io.FileNotFoundException - /cipec/imagens/312220.jpg (Too many open files) [ERROR] Error in XObject : Error while loading image file:/cipec/imagens/312221.jpg : class java.io.FileNotFoundException - /cipec/imagens/312221.jpg (Too
Re: XSLT Question
Hi J, Partly you are right, with your test I can tell what image I need for the current level of the tree, but I can't see how to retrieve the required images from lower levels. the test you described needs to be done for every element up to level 0. It's not just the Indent which I want to show, but also some lines and branches, depending from the structure. Like the folder tree in an windows explorer window. Ciao! Kai Hi, Kai, I don't think you need to call a template for that. You can test for the characteristics of the node from within the matching template and get the image you need. Several xsl:when statements within an xsl:choose block should let you figure out which images to use when. For example, xsl:when test=generate-id(.)=generate-id(../*[last()]) will tell you whether the current node is the last child node of its parent. Also, to indent properly, you can read the Level attribute and put the appropriate number of indentation objects (blank table cells, spaces, whatever you use) before the image. J - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: XSLT Question
Hi, Kai, Here are two layouts of a file structure. (To appear correctly, they need to be viewed with a monospace font.) Since I don't like to send images to mailing lists, I have used text symbols as shown below: Key: |-A node that is not the last node at its level -A node that is the last node at its level | Continuation of an ancestor level Root |-Dir1 | |-File11 | -File12 |-Dir2 | |-File21 | |-File22 | |-Dir21 | | |-File211 | | -File212 | -Dir22 | -File221 -Dir3 Root |-Dir1 |-File11 -File12 |-Dir2 |-File21 |-File22 |-Dir21 |-File211 -File212 -Dir22 -File221 -Dir3 Which one are you after? Or have I not grasped the problem? In the first case, you need either a for-each or a recursive template to generate all the continuation images and space them properly. In the second, you don't, because you can just multiply the level by the indent amount per level. (If you are writing to HTML rather than PDF, you could use a for-each to generate the right number of nbsp characters or empty table cells or whatever.) From a user-interface design point of view, by the way, the second view is much better. The first is very cluttered. All those lines draw the eye away from the information that matters without adding any value. If you must do the first, you should make the lines NOT stand out (light grey and thin lines would do). By the way, the Windows XP Explorer just has boxes with + and - signs. It has no lines at all, relying purely on indentation to show the relation between levels. In my view, that's one of the things Microsoft did right. Jay Bryant Bryant Communication Services (presently consulting at Synergistic Solution Technologies) Kai Hackemesser [EMAIL PROTECTED] 02/21/2005 11:45 AM Please respond to [EMAIL PROTECTED] To [EMAIL PROTECTED] cc Subject Re: XSLT Question Hi J, Partly you are right, with your test I can tell what image I need for the current level of the tree, but I can't see how to retrieve the required images from lower levels. the test you described needs to be done for every element up to level 0. It's not just the Indent which I want to show, but also some lines and branches, depending from the structure. Like the folder tree in an windows explorer window. Ciao! Kai Hi, Kai, I don't think you need to call a template for that. You can test for the characteristics of the node from within the matching template and get the image you need. Several xsl:when statements within an xsl:choose block should let you figure out which images to use when. For example, xsl:when test=generate-id(.)=generate-id(../*[last()]) will tell you whether the current node is the last child node of its parent. Also, to indent properly, you can read the Level attribute and put the appropriate number of indentation objects (blank table cells, spaces, whatever you use) before the image. J - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: XSLT Question
Hi, Jay, The first example is the perfect hit: Key: |-A node that is not the last node at its level -A node that is the last node at its level | Continuation of an ancestor level Root |-Dir1 | |-File11 | -File12 |-Dir2 | |-File21 | |-File22 | |-Dir21 | | |-File211 | | -File212 | -Dir22 | -File221 -Dir3 In the first case, you need either a for-each or a recursive template to generate all the continuation images and space them properly. Thats what I'm searching a solution for ... From a user-interface design point of view, by the way, the second view is much better. The first is very cluttered. All those lines draw the eye away from the information that matters without adding any value. If you must do the first, you should make the lines NOT stand out (light grey and thin lines would do). Customer wishes *sigh* By the way, the Windows XP Explorer just has boxes with + and - signs. It has no lines at all, relying purely on indentation to show the relation between levels. In my view, that's one of the things Microsoft did right. You are right! I maybe had another tool in mind, TreeSize or such. Ciao! Kai - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: XSLT Question
Hi, Kai, The following stylesheet, applied to the following XML (an extension of your example), generates the same tree view as used by the Acrobat Reader (at least in version 7): XSL: ?xml version=1.0 encoding=UTF-8? xsl:stylesheet version=1.0 xmlns:xsl=http://www.w3.org/1999/XSL/Transform; xsl:template match=objects html head titleTest/title /head style lt;!-- td {font-family:monospace} --gt; /style body table xsl:apply-templates/ /table /body /html /xsl:template xsl:template match=object tr td xsl:for-each select=ancestor::object[not(position()=last())] xsl:choose xsl:when test=generate-id(.)=generate-id(../*[last()]) #160;#160; /xsl:when xsl:otherwise |#160; /xsl:otherwise /xsl:choose /xsl:for-each xsl:choose xsl:when test=generate-id(.)=generate-id(../*[last()]) xsl:if test=..[not(name()='objects')]#160;-/xsl:if xsl:value-of select=@id/ /xsl:when xsl:otherwise |-xsl:value-of select=@id/ /xsl:otherwise /xsl:choose xsl:apply-templates/ /td /tr /xsl:template xsl:template match=relation xsl:apply-templates/ /xsl:template /xsl:stylesheet XML: objects object Level=0 id=01 relation Level=0 object Level=1 id=11 relation Level=1 object Level=2 id=21 relation Level=2 object Level=3 id=31/ object Level=3 id=32/ /relation /object object Level=2 id=22 relation Level=2 object Level=3 id=33 relation Level=3 object Level=4 id=41/ object Level=4 id=42/ /relation /object object Level=3 id=34 relation Level=3 object Level=4 id=43/ object Level=4 id=44/ /relation /object /relation /object object Level=2 id=23 relation level=2 object Level=3 id=35/ object Level=3 id=36/ /relation /object /relation /object /relation /object /objects Note that the relation elements and Level attributes are unnecessary. If you have control over the application that generates the XML, you could eliminate them. In that case you could alse eliminate the match=relation template in the XSL. If you want a line down the left-most edge, I'll have to leave that to you. I have run out of the time that I can spend on someone else's project. I did enjoy having something different to work on, though. Thanks. Jay Bryant Bryant Communication Services (presently consulting at Synergistic Solution Technologies) Kai Hackemesser [EMAIL PROTECTED] 02/21/2005 11:45 AM Please respond to [EMAIL PROTECTED] To [EMAIL PROTECTED] cc Subject Re: XSLT Question Hi J, Partly you are right, with your test I can tell what image I need for the current level of the tree, but I can't see how to retrieve the required images from lower levels. the test you described needs to be done for every element up to level 0. It's not just the Indent which I want to show, but also some lines and branches, depending from the structure. Like the folder tree in an windows explorer window. Ciao! Kai Hi, Kai, I don't think you need to call a template for that. You can test for the characteristics of the node from within the matching template and get the image you need. Several xsl:when statements within an xsl:choose block should let you figure out which images to use when. For example, xsl:when test=generate-id(.)=generate-id(../*[last()]) will tell you whether the current node is the last child node of its parent. Also, to indent properly, you can read the Level attribute and put the appropriate number of indentation objects (blank table cells, spaces, whatever you use) before the image. J - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: XSLT Question
Hi, Kai, Well, perhaps the solution I just sent will be good enough. Maybe you can say, That's how Adobe does it, and get away with it... If not, that left-most line will require a recursive template. Jay Bryant Bryant Communication Services (presently consulting at Synergistic Solution Technologies). Kai Hackemesser [EMAIL PROTECTED] 02/21/2005 02:12 PM Please respond to [EMAIL PROTECTED] To [EMAIL PROTECTED] cc Subject Re: XSLT Question Hi, Jay, The first example is the perfect hit: Key: |-A node that is not the last node at its level -A node that is the last node at its level | Continuation of an ancestor level Root |-Dir1 | |-File11 | -File12 |-Dir2 | |-File21 | |-File22 | |-Dir21 | | |-File211 | | -File212 | -Dir22 | -File221 -Dir3 In the first case, you need either a for-each or a recursive template to generate all the continuation images and space them properly. Thats what I'm searching a solution for ... From a user-interface design point of view, by the way, the second view is much better. The first is very cluttered. All those lines draw the eye away from the information that matters without adding any value. If you must do the first, you should make the lines NOT stand out (light grey and thin lines would do). Customer wishes *sigh* By the way, the Windows XP Explorer just has boxes with + and - signs. It has no lines at all, relying purely on indentation to show the relation between levels. In my view, that's one of the things Microsoft did right. You are right! I maybe had another tool in mind, TreeSize or such. Ciao! Kai - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problem with report tail
Chris Bowditch wrote: I dont understand what you mean. If you insert footnote at end of body, then footnote should appear on last page that content spills onto. No it wont. In 0.20.5 page generation stops after the main flow runs out of content, regardless whether there's pending content from footnotes. This is a known defect. J.Pietschmann - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: fop error - Too many open files
Elton Simões Baptista wrote: [EMAIL PROTECTED] dbf]$ [EMAIL PROTECTED] dbf]$ fop.sh cat-scania.fo -pdf cat-scania.pdf Your JRE seems to have difficulties with disposing unused File objects in time. Well, maybe FOP has indeed an object leak, it's quite hard to tell from a quick glance at the code. Some possible solutions: - Track down the part in the JPG reader after which the all data has been read, and close the connection explicitely - Convert the images into another format, like GIF or BMP, which is processed differently and wont have the same problem. In particular you'll probably get quite different effects if you use GIF images. - Increase the number of file handles for your user processes, or the hard file handle limit in the kernel. Reboot. - Render the document piecewise, and use another PDF library like iText to concat the pieces. J.Pietschmann - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: repeating column cell
Rymasz Jacky wrote: I've got a table with 2 colums. The first colum is a title (kind of header) and the second column contains a lot of text of unknown size. The text in the second coloumn can be so big that it can overlap several pages. I would like to have the title of the first column to repeat itself from page to page The spec doesn't provide a construct for an easy solution to your problem. You can try to fake the effect by using an overlapping region-before and a marker. J.Pietschmann - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
What is a table IPD?
I get the following error: [java] [ERROR] At least one of minimum, optimum, or maximum IPD must be specified on table. occuring a page that starts a long (but simple) table extending over multiple pages. Searching the source code for maximum IPD does not turn up anything and my XSL-FO book doesn't mention anything that looks like it could be called IPD - what is it talking about? Bill - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: What is a table IPD?
IPD = inline-progression-dimension FOP is probably peeved because you didn't tell it how big to make the columns. FOP doesn't automatically determine the size of columns. If you can't figure it out pretty quickly from that info, send a code listing (short as possible but that shows the problem) to the list. Jay Bryant Bryant Communication Services (presently consulting at Synergistic Solution Technologies) William Brogden [EMAIL PROTECTED] 02/21/2005 03:56 PM Please respond to [EMAIL PROTECTED] To [EMAIL PROTECTED] cc Subject What is a table IPD? I get the following error: [java] [ERROR] At least one of minimum, optimum, or maximum IPD must be specified on table. occuring a page that starts a long (but simple) table extending over multiple pages. Searching the source code for maximum IPD does not turn up anything and my XSL-FO book doesn't mention anything that looks like it could be called IPD - what is it talking about? Bill - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: XSLT Question
Hi, Jay, I try your solution tomorrow to see how it looks like. If I found a better solution I will tell you here :-) But many thanks for your hints! Kai Hi, Kai, The following stylesheet, applied to the following XML (an extension of your example), generates the same tree view as used by the Acrobat Reader (at least in version 7): XSL: ?xml version=1.0 encoding=UTF-8? xsl:stylesheet version=1.0 xmlns:xsl=http://www.w3.org/1999/XSL/Transform; xsl:template match=objects html head titleTest/title /head style lt;!-- td {font-family:monospace} --gt; /style body table xsl:apply-templates/ /table /body /html /xsl:template xsl:template match=object tr td xsl:for-each select=ancestor::object[not(position()=last())] xsl:choose xsl:when test=generate-id(.)=generate-id(../*[last()]) #160;#160; /xsl:when xsl:otherwise |#160; /xsl:otherwise /xsl:choose /xsl:for-each xsl:choose xsl:when test=generate-id(.)=generate-id(../*[last()]) xsl:if test=..[not(name()='objects')]#160;-/xsl:if xsl:value-of select=@id/ /xsl:when xsl:otherwise |-xsl:value-of select=@id/ /xsl:otherwise /xsl:choose xsl:apply-templates/ /td /tr /xsl:template xsl:template match=relation xsl:apply-templates/ /xsl:template /xsl:stylesheet XML: objects object Level=0 id=01 relation Level=0 object Level=1 id=11 relation Level=1 object Level=2 id=21 relation Level=2 object Level=3 id=31/ object Level=3 id=32/ /relation /object object Level=2 id=22 relation Level=2 object Level=3 id=33 relation Level=3 object Level=4 id=41/ object Level=4 id=42/ /relation /object object Level=3 id=34 relation Level=3 object Level=4 id=43/ object Level=4 id=44/ /relation /object /relation /object object Level=2 id=23 relation level=2 object Level=3 id=35/ object Level=3 id=36/ /relation /object /relation /object /relation /object /objects Note that the relation elements and Level attributes are unnecessary. If you have control over the application that generates the XML, you could eliminate them. In that case you could alse eliminate the match=relation template in the XSL. If you want a line down the left-most edge, I'll have to leave that to you. I have run out of the time that I can spend on someone else's project. I did enjoy having something different to work on, though. Thanks. Jay Bryant Bryant Communication Services (presently consulting at Synergistic Solution Technologies) Kai Hackemesser [EMAIL PROTECTED] 02/21/2005 11:45 AM Please respond to [EMAIL PROTECTED] To [EMAIL PROTECTED] cc Subject Re: XSLT Question Hi J, Partly you are right, with your test I can tell what image I need for the current level of the tree, but I can't see how to retrieve the required images from lower levels. the test you described needs to be done for every element up to level 0. It's not just the Indent which I want to show, but also some lines and branches, depending from the structure. Like the folder tree in an windows explorer window. Ciao! Kai Hi, Kai, I don't think you need to call a template for that. You can test for the characteristics of the node from within the matching template and get the image you need. Several xsl:when statements within an xsl:choose block should let you figure out which images to use when. For example, xsl:when test=generate-id(.)=generate-id(../*[last()]) will tell you whether the current node is the last child node of its parent. Also, to indent properly, you can read the Level attribute and put the appropriate number of indentation objects (blank table cells, spaces, whatever you use) before the image. J - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]