Re: text-indent issue
Since both the text preceding the nested block and the text following the nested block are within the indented block, the text after the nested block gets indented. You'd need to move the text after the nested block to its own block to not have it be indented. fo:block text-indent=5 This is just for testing purpose and this line will be indented. fo:blockthis is the nested block /fo:block /fo:block fo:block The text following the nested block is indented as well...not sure if this is as per spec. since it does not happen in other renderers. /fo:block If other rendering engines are NOT indenting the text after the nested block, then they are not honoring the spec. The attributes of a block should be applied to ALL the things within the block (unless specifically overridden by a child element's attributes). HTH Jay Bryant Bryant Communication Services (presently consulting at Synergistic Solution Technologies) Puppala, Kumar (LNG-DAY) [EMAIL PROTECTED] 03/16/2005 12:31 PM Please respond to fop-users@xmlgraphics.apache.org To 'fop-users@xmlgraphics.apache.org' fop-users@xmlgraphics.apache.org cc Subject text-indent issue If I have text-indent specified on an fo:block and if I have a nested block within this, the text following this nested block is indented as well. For example: fo:block text-indent=5 This is just for testing purpose and this line will be indented. fo:blockthis is the nested block /fo:block The text following the nested block is indented as well...not sure if this is as per spec. since it does not happen in other renderers. /fo:block In the above example, the text following the second block should not be indented since text-indent applies only to the first line of that block and not to any subsequent text in that block. Is there a way to get around this issue by specifying some property on the first block? I appreciate your help. Thanks, Kumar Puppala - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: text-indent issue
My apologies. I had confused text-indent with start-indent. I guess FOP has a bug here. The work around appears to be not having text after a nested block. Jay Bryant Bryant Communication Services (presently consulting at Synergistic Solution Technologies) Puppala, Kumar (LNG-DAY) [EMAIL PROTECTED] 03/16/2005 12:49 PM Please respond to fop-users@xmlgraphics.apache.org To 'fop-users@xmlgraphics.apache.org' fop-users@xmlgraphics.apache.org cc Subject RE: text-indent issue I totally agree that all the PCDATA is owned by the outer fo:block and hence when it applies the text-indent property, it should apply only to the first line in that block. The spec. for text-indent says: This property specifies the indentation of the first line of text in a block. More precisely, it specifies the indentation of the first box that flows into the block's first line box. The box is indented with respect to the left (or right, for right-to-left layout) edge of the line box. User agents should render this indentation as blank space. Any thoughts or comments? Thanks, Kumar Puppala -Original Message- From: Glen Mazza [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 16, 2005 1:46 PM To: fop-users@xmlgraphics.apache.org Subject: Re: text-indent issue --- Puppala, Kumar (LNG-DAY) [EMAIL PROTECTED] wrote: If I have text-indent specified on an fo:block and if I have a nested block within this, the text following this nested block is indented as well. For example: fo:block text-indent=5 This is just for testing purpose and this line will be indented. fo:blockthis is the nested block /fo:block The text following the nested block is indented as well...not sure if this is as per spec. since it does not happen in other renderers. /fo:block In the above example, the text following the second block should not be indented since text-indent applies only to the first line of that block and not to any subsequent text in that block. I really don't think so. All of the PCDATA in your example is owned by that outer fo:block, and subject to its properties. Is there a way to get around this issue by specifying some property on the first block? I appreciate your help. De-nest your fo:blocks? Glen - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Why xmlgraphics?
Why the change from xml.apache.org to xmlgraphics.apache.org? Jay Bryant Bryant Communication Services (presently consulting at Synergistic Solution Technologies) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Why xmlgraphics?
I just don't want to see FOP lose its focus on implementing the XSL-FO spec and wander off into becoming some kind of oddball graphics rendering engine for other purposes. The current version of FOP is a good tool that I use a lot, and it has substantial promise to become even better in the upcoming versions, so I'd hate to see it get sidetracked. Jay Bryant Bryant Communication Services (presently consulting at Synergistic Solution Technologies) Jeremias Maerki [EMAIL PROTECTED] 03/14/2005 10:13 AM Please respond to fop-users@xmlgraphics.apache.org To fop-users@xmlgraphics.apache.org cc Subject Re: Why xmlgraphics? The Apache board of director requested some time ago that oversight over the individual projects be improved. The XML project's PMC couldn't provide the demanded oversight over so many projects. The XML project is in the process of being broken down. For example, Xalan and Xerces both become top-level projects. The same happened with Forrest a bit earlier. XML Graphics was created to host both FOP and Batik because both subprojects each implement an XML specification that is used to create graphical output. Additionally, both subprojects have certain parts they are both interested in (ex. PDF library, SVG to PDF conversion etc.). We will soon create an area where common components (used by both subprojects) will be maintained. And with the reduced size and the mutual interest of the subprojects we can reestablish the oversight that the board requested. I hope that answers it. On 14.03.2005 16:38:27 JBryant wrote: Why the change from xml.apache.org to xmlgraphics.apache.org? 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: make table border visible
The following element in an FO file produces a border for me (in PDF): fo:table table-layout=fixed border-width=0.5pt border-style=solid border-color=black Perhaps you tried fo:table table-layout=fixed border=0.5pt border-style=solid border-color=black I can see where many processors would simply ignore the style and color attributes in favor of the compound property. In that case, you'd have an invisible border. Disclaimer: I use FOP to create PDF files, and I don't know anything about JFOR. Thus, my help has to be pretty limited here. Jay Bryant Bryant Communication Services (presently consulting at Synergistic Solution Technologies) [EMAIL PROTECTED] [EMAIL PROTECTED] 03/14/2005 11:01 AM Please respond to fop-users@xmlgraphics.apache.org To fop-users fop-users@xmlgraphics.apache.org cc Subject RE: make table border visible Actually if I use border-style or border-color the border disappear somewhere..Is there not a general border attribute for the fo:table tag? -- Initial Header --- From : Riz Virk [EMAIL PROTECTED] To : fop-users@xmlgraphics.apache.org Cc : Date : Mon, 14 Mar 2005 11:19:29 -0500 Subject : RE: make table border visible Hi guys, Most likely you are seeing the pseudo border that word shows on screen to tell you where cells start and end, rather than an actual border. Assuming you are using .71 of jfor, i don't think it supports the compound fo property border (your fo says: border=0.75pt solid black) . Rather, you will have to use border-color, or border-style, or border-xxx-color, border-xxx-style where xxx is one of top, left, right, bottom. Thanks Riz Rizwan Virk CTO CambridgeDocs [EMAIL PROTECTED] personal: [EMAIL PROTECTED] From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Mon 3/14/2005 11:15 AM To: fop-users Subject: Re: make table border visible I suspect that is an attribute not well setted in xsl-foMy question was how to make solid a table cell border? I do not think is a JFOR problem and so for xsl-fo Help -- Initial Header --- From : [EMAIL PROTECTED] To : fop-users@xmlgraphics.apache.org Cc : Date : Mon, 14 Mar 2005 10:11:16 -0600 Subject : Re: make table border visible Have you checked the RTF output? Does it contain the correct elements to produce the border? If so, then this would be a JFOR problem. If not, then it's a FOP problem. Given that you see the borders in a viewing application but not when printed, I am inclined to suspect that the problem comes from whatever you use to print. Jay Bryant Bryant Communication Services (presently consulting at Synergistic Solution Technologies) [EMAIL PROTECTED] [EMAIL PROTECTED] 03/14/2005 10:04 AM Please respond to fop-users@xmlgraphics.apache.org To fop-users fop-users@xmlgraphics.apache.org cc Subject Re: make table border visible I should produce an RTF using JFOR and xsl-fo...so my output is xsl:output encoding=ISO-8859-1/ but when I set the fo:table-cell border=0.75pt solid black display-align=after number-columns-spanned=8 padding-left=3.5pt padding-right=3.5pt nothing is visible when I print. It is visible just on screen. Help -- Initial Header --- From : [EMAIL PROTECTED] To : fop-users@xmlgraphics.apache.org Cc : Date : Mon, 14 Mar 2005 10:00:10 -0600 Subject : Re: make table border visible What kind of output are you producing? What are you using to view it? Jay Bryant Bryant Communication Services (presently consulting at Synergistic Solution Technologies) [EMAIL PROTECTED] [EMAIL PROTECTED] 03/14/2005 09:56 AM Please respond to fop-users@xmlgraphics.apache.org To fop-users fop-users@xmlgraphics.apache.org cc Subject make table border visible Hi all.I'm rendering with xsl-fo a table but all the cell borders are visible just on the screen and not when I print my document. Any usefull attribute for rendering a solid visible,printable table border? Regards Giovanni Di Lembo Navighi a 2 MEGA e i primi 3 mesi sono GRATIS. Scegli Libero Adsl Flat senza limiti su http://www.libero.it - 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: Why xmlgraphics?
Hint received. However, I am too busy using it to spend any time developing it. (Actually, at this point, I rarely look at FOP. It runs a lot to produce all kinds of documents around here, but my work these days mostly consists of writing documents rather than setting up the document production system. Being a one-person documentation department at a software company is an interesting job.) If it helps any, rest assured that I very much appreciate and applaud your efforts and the efforts of the others who develop FOP. Jay Bryant Bryant Communication Services (presently consulting at Synergistic Solution Technologies) Jeremias Maerki [EMAIL PROTECTED] 03/14/2005 11:21 AM Please respond to fop-users@xmlgraphics.apache.org To fop-users@xmlgraphics.apache.org cc Subject Re: Why xmlgraphics? Don't worry. That won't happen. We're on track. And if we get some help on the way, even better. hint, hint! On 14.03.2005 17:54:04 JBryant wrote: I just don't want to see FOP lose its focus on implementing the XSL-FO spec and wander off into becoming some kind of oddball graphics rendering engine for other purposes. The current version of FOP is a good tool that I use a lot, and it has substantial promise to become even better in the upcoming versions, so I'd hate to see it get sidetracked. Jay Bryant Bryant Communication Services (presently consulting at Synergistic Solution Technologies) Jeremias Maerki [EMAIL PROTECTED] 03/14/2005 10:13 AM Please respond to fop-users@xmlgraphics.apache.org To fop-users@xmlgraphics.apache.org cc Subject Re: Why xmlgraphics? The Apache board of director requested some time ago that oversight over the individual projects be improved. The XML project's PMC couldn't provide the demanded oversight over so many projects. The XML project is in the process of being broken down. For example, Xalan and Xerces both become top-level projects. The same happened with Forrest a bit earlier. XML Graphics was created to host both FOP and Batik because both subprojects each implement an XML specification that is used to create graphical output. Additionally, both subprojects have certain parts they are both interested in (ex. PDF library, SVG to PDF conversion etc.). We will soon create an area where common components (used by both subprojects) will be maintained. And with the reduced size and the mutual interest of the subprojects we can reestablish the oversight that the board requested. I hope that answers it. On 14.03.2005 16:38:27 JBryant wrote: Why the change from xml.apache.org to xmlgraphics.apache.org? 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] 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: Multiply PDF from one XML
Yes. Use the xsl:result-document feature of XSL2 (which pretty much means using Saxon 8 as your XSL processor) or use an extension function (check out EXSLT for a good set of them). That lets you create multiple FO files from one XSL file applied to one (or more) XML files. Then you can run FOP on each FO file to produce the PDF files (or whatever output you want from FOP). FWIW, I haven't used Xalan in a long time. I went to Saxon 8 in July specifically to use the result-document instruction. Jay Bryant Bryant Communication Services (presently consulting at Synergistic Solution Technlogies) Miroslav Pukhalsky [EMAIL PROTECTED] 03/01/2005 01:28 PM Please respond to [EMAIL PROTECTED] To [EMAIL PROTECTED] cc Subject Multiply PDF from one XML Hi there! Can I get more than one PDF file using one XML file with data and XSL-FO transformation? Miroslav - 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: check to see if newpage is created
If you are using static-content blocks to create headers and footers, you'll automatically get that content on the new page. You can also put a running title in the header or footer. If you make the header area big enough and apply the same style choices to the running title, I suppose you could make it like like a continued title (perhaps even with the word continued after the title). As a rule, that's OK in short (two pages or so) documents but will be seen as heavy-handed for long documents. If you want to insert a new title in the body of the document each time a new page is created, I think you're out of luck. I don't believe FOP offers a mechanism to detect when a flow has crossed a page boundary. I don't think this is a weakness of FOP, by the way. I'm pretty sure the FO spec offers no such mechanism, so any compliant implementation of the spec does not have that feature. (I have qualified all my statements because I have not taken the time to go check the spec.) HTH Jay Bryant Bryant Communication Services (presently consulting at Synergistic Solution Technologies) Jaysheel Bhavsar [EMAIL PROTECTED] 03/01/2005 04:08 PM Please respond to [EMAIL PROTECTED] To [EMAIL PROTECTED] cc Subject check to see if newpage is created Hi, I am displaying some text on one of the pages, and some times the text might be long enough that a new page is created. Is there a way to check if a new page is created so I put some page title eg. (cont...) or something else. Thanks Jaysheel. - 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: N xml, 1 PDF
That's an XSLT question rather than an XSL-FO question. XSLT can solve this problem with the document function, thus: Use a for-each to read each document spec in the configuration file. For each doc spec, read the referenced document and copy it to the result tree. Something like this (assuming you want the XML file specified by the Document element): xsl:template match=/*|text()|@* xsl:for-each select=document('conffile.xml')/Lesson/Document xsl:copy-of select=document(@uri)/* /xsl:for-each /xsl:template If you want all three XML files in each Lesson element: xsl:template match=/*|text()|@* xsl:for-each select=document('conffile.xml')/Lesson xsl:copy-of select=document(Document/@uri)/*/ xsl:copy-of select=document(Exercises/@uri)/* xsl:copy-of select=document(ScormBlocco/@uri)/* /xsl:for-each /xsl:template I was going to say I hadn't tested it, but I took the time (not much - it has taken me longer to write this message) to write and test (with Saxon 8) a small set of files that illustrate the technique: Configuration file (conffile.xml): files file uri=file1.xml/ file uri=file2.xml/ /files file1.xml: document level1 level=1 level2 level=2A/level2 /level1 level1 level=1 level2 level=2B/level2 level2 level=2C/level2 /level1 /document file2.xml document level1 level=1 level2 level=2D/level2 /level1 level1 level=1 level2 level=2E/level2 level2 level=2F/level2 /level1 /document XSL file: ?xml version=1.0 encoding=UTF-8? xsl:stylesheet version=2.0 xmlns:xsl=http://www.w3.org/1999/XSL/Transform; xsl:template match=/ document xsl:for-each select=document('conffile.xml')/files/file xsl:copy-of select=document(@uri)/document/*/ /xsl:for-each /document /xsl:template /xsl:stylesheet The result (with some formatting for readibility): ?xml version=1.0 encoding=UTF-8? document level1 level=1 level2 level=2A/level2 /level1 level1 level=1 level2 level=2B/level2 level2 level=2C/level2 /level1 level1 level=1 level2 level=2D/level2 /level1 level1 level=1 level2 level=2E/level2 level2 level=2F/level2 /level1 /document A couple things to note: I put in the attributes just to make sure that attributes would be copied correctly. Obviously, they are redundant and useless for any real purpose. The important note is how I handled the document element in each source file. Had I not written a literal result element (document) around the for-each and had I used xsl:copy-of select=document(@uri)/*/, I would have wound up with a file like this: document!--contents here --/document document!--contents here --/document Since only one element can be present at the root level of an XML file, that would be a bad result. I do similar things all the time, usually to interweave elements from two different documents or to compare documents. HTH Jay Bryant Bryant Communication Services (presently consulting at Synergistic Solution Technologies) Tommaso Taglioni [EMAIL PROTECTED] 02/24/2005 08:29 AM Please respond to [EMAIL PROTECTED] To [EMAIL PROTECTED] cc Subject N xml, 1 PDF Hi all, I have some XML file and I have to make only one PDF of them. I have also a configuration file that have the order and the names of the XML. The structure of the configuration file is like this: Module number=6 Lesson Document uri=xml\1concettibase.xml/ Exercises uri=xml\Domande1.xml/ ScormBlocco uri=xml\1concettibase_SCORM-MANIFEST.xml/ /Lesson Lesson Document uri=xml\2audio.xml/ Exercises uri=xml\Domande2.xml/ ScormBlocco uri=xml\2audio_SCORM-MANIFEST.xml/ /Lesson . . . . Objective uri=xml\obiettivi.xml ScormBlocco uri=xml\obiettivi_SCORM-MANIFEST.xml/ /Objective Video uri=/ Bibliography uri=xml\bibliografia.xml ScormBlocco uri=xml\obiettivi_SCORM-MANIFEST.xmll/ /Bibliography /Module I have to bypass all concerns to SCORM and video, because obviously I don't need in the PDF. Is this all possible using FOP?How? Tommaso - 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 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
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, 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: 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: printing page numbers
Move the text-align property to the fo:block element (and you can then remove the inline wrapper, since text-align is its only attribute). Jay Bryant Bryant Communication Services (presently consulting at Synergistic Solution Technologies) Jaysheel Bhavsar [EMAIL PROTECTED] 02/16/2005 02:48 PM Please respond to [EMAIL PROTECTED] To [EMAIL PROTECTED] cc Subject RE: printing page numbers Hi, Here is part of my xsl sheet it is working fine, I get it to display page 1 of x. Now the problem I am running into is I cannot align my text for some reason. I have tried end and right but my text page 1 of x always stays on the left. Is there something I am missing. Is this because its in the footer of the page? -- fo:layout-master-set !-- layout for the first page -- fo:simple-page-master master-name=test page-height=11in page-width=8.5in margin-bottom=0.25in margin-top=0.25in fo:region-before extent=1.5cm/ fo:region-body margin-top=0.2in/ fo:region-start extent=1.0in/ fo:region-end extent=0.3in/ fo:region-after extent='1.0cm' region-name=footer/ /fo:simple-page-master /fo:layout-master-set fo:page-sequence master-reference=test initial-page-number=1 !-- usage of page layout -- !-- header -- fo:static-content flow-name=footer fo:block font-family=Helvetica font-size=7pt fo:inline text-align=end Page fo:page-number/ of fo:page-number-citation ref-id=last-page/ /fo:inline /fo:block /fo:static-content fo:flow flow-name=xsl-region-body fo:block xsl:apply-templates/ /fo:block fo:block id=last-page/ /fo:flow /fo:page-sequence - 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: representative example needed
Thanks! Success stories ([1] is my favorite)--as well as failures (honesty of its limitations also being helpful in increasing confidence in FOP)--are always welcome on this list. Oh, you want success stories. That I can do. I use FOP to produce all the documentation for a small software firm. I am a consulting technical writer (though I have been programming at least part time since 1987). I am responsible for creating documents both for the company itself and for several customers (each of whom naturally wants their own logos, legal wording, and so on). I use two primary stylesheets with FOP: One to produce most of my conventional documents (user guides, API guides, etc.) and another specifically for data dictionaries. The firm specializes in data warehouses for the software industry, so each customer needs a customized data dictionary. So far, the largest has been over 1600 pages in size, and FOP produces it in about 2 minutes. By the way, I use Saxon to write the FO source, since I use a number of XSLT 2 features. I also use Saxon to write the HTML versions of our documents. The only thing I really wish FOP had is better control over page breaks. I use small tables to keep headings with their trailing paragraphs and images with their captions. Other than that, I use an attribute in my five levels of heading elements to force a page break (with break-before), so I can make things look OK. Still, I wish it did better with keeps and breaks in general. I gather that's the big problem that drove the creation of a new branch and the current 1.0 effort. I've had to accept some other limitations and fiddle with memory settings, but keeps and breaks have been the only real limitation to date. In sum, thanks for FOP! It makes me look good with my client and my client's customers. I very much look forward to seeing future versions. Jay Bryant Bryant Communication Services (presently consulting at Synergistic Solution Technologies) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: representative example needed
I was also taken aback by what seems to be a plug for RenderX. FOP does all that I need, so I've never looked at RenderX, and this doesn't seem a like a logical forum in which to plug a commercial product. Unfortunately, while I have produced several large PDF files (my record so far is a bit over 1600 pages) with FOP, I can't share them with anyone outside the company for which I am consulting. I would, however, be willing to develop a large representative example. I would just need the content. From there, I could develop the XSLT that would write the FO that FOP uses (my usual method for writing FO - I generally only look at the FO to debug). So, if someone can provide or point to a large open-source XML document that I could convert with FOP, I'd give it a go. Jay Bryant Bryant Communication Services (currently on contract at Synergistic Solution Technologies) Ilya Khandamirov [EMAIL PROTECTED] 02/04/2005 09:33 AM Please respond to [EMAIL PROTECTED] To [EMAIL PROTECTED] cc Subject Re: representative example needed Hi Glen, Do you want to say, that people listed under http://xml.apache.org/fop/team.html (including yourself) are less professional then RenderX? I do not think so. Or maybe it was the usual complaint about open source limited resources? I think, you'll agree, that lack of resources is also often the case in many professional companies, and does not necessary have something to do with open source. FOP is popular. I believe, FOP is also good. I just want to find out, how good it is. My hope is, that either the FOP team or one of the numerous happy FOP users could provide me with a representative sample. Regards, Ilya Indeed, RenderX is a very solid product run by a very professional company. It would be hard to go wrong with them. Glen --- Ilya Khandamirov [EMAIL PROTECTED] wrote: Hi, I need a representative exampe, of what is possible to do with FOP. For example, RenderX XEP comes with XML versions of XML, XSLT and XPath specs and a stylesheet to convert them to XSL-FO (say PDF). The generated PDFs look very impressive. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Lassen Sie Ihren Gedanken freien Lauf... z.B. per FreeSMS GMX bietet bis zu 100 FreeSMS/Monat: http://www.gmx.net/de/go/mail - 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: representative example needed
Oh, it would be so cool if we could have our own PDF of the XSL 1.0 specification [1]. The official PDF was created by RenderX. I thought about doing a stylesheet for that myself but I'm currently so busy coding on FOP 1.0dev that I'd be more than happy if someone from the user community could do that. It would also be interesting to compare FOP 0.20.5 and FOP 1.0dev which is under development. [1] http://www.w3.org/TR/xsl/ Well, I downloaded the XML source from W3C and got RenderX's trial product to see what they did. After a brief review, I don't see anything in the document that I can't handle, but I may get stuck anyway. Anyway, I'll work on it on a time-available basis (my clients would like to see their work get done, too, you know). Given the size of the thing and the time I can devote to it, I bet it'll be a few months before I have anything to to show. Jay Bryant Bryant Communication Services (currently on contract at Synergistic Solution Technologies) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: XML --- PDF Japanese
Just a thought: Did you set up the necessary font-metrics file? You can find an example (called cid-fonts.fo) in the examples\fo\advanced (Windows) or examples/fo/advanced (Linux or Unix) directory. Jay Bryant Bryant Communication Services (on contract at Syngergistic Solution Technologies) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Avoiding Blank Pages When using Multiple Page Sequences
My thought precisely. Here is a fragment from a stylesheet I wrote to print books (for the software industry): xsl:if test=$showIndex='yes' fo:page-sequence master-reference=index !-- static-content and flow goes here, to define the index pages -- /fo:page-sequence /xsl:if The $showIndex variable gets populated at the top of the stylesheet, based on an implied (and so not always present) attribute in the XML, thus: xsl:variable name=showIndex xsl:choose xsl:when test=book/@showIndex='no'no/xsl:when xsl:otherwiseyes/xsl:otherwise /xsl:choose /xsl:variable Jay Bryant Bryant Communication Services (on contract at Synergistic Solution Technologies) J.Pietschmann [EMAIL PROTECTED] 01/27/2005 03:28 PM Please respond to [EMAIL PROTECTED] To [EMAIL PROTECTED] cc Subject Re: Avoiding Blank Pages When using Multiple Page Sequences Ram Krishnamoorthi wrote: In each of my Page Sequence, I am calling one or two XSL Templates. In my case, it is possible that I may not have any data to Print in a Page Sequence because of the absence of specific tags in the Input XML File.I would like to avoid having blank pages in the PDF document. Is there any attribute I can specify to achieve the same? You'll have to avoid generating the page sequence at the XSLT level. One possiblity is to put a test for the existence of the elements which provide the content around the code which generates the page sequence. J.Pietschmann - 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: Blocks within same page
Put them both in a table and set the keep-together property on both cells. One of the limitations of 0.20.5 is that only tables support keeps. Jay Bryant Bryant Communication Services (on contract at Synergistic Solution Technologies) Sajeesh N Kakkat [EMAIL PROTECTED] 01/11/2005 03:47 AM Please respond to [EMAIL PROTECTED] To [EMAIL PROTECTED] cc Subject Blocks within same page Hi, How do I make sure that two blocks should always come together in one page if there is a page break in between, the print should not separate them in diff pages. I tried the keep-with-next.within-page=always for a fo:block but it doesnt seem to work, Any ideas ? Sajeesh - 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: Table Help
What I don't understand is the relationship between columns and tables. Well, the fo:table element requires one or more fo:table-column elements as children. In other words, you have to remember that XSL:FO requires you to specify the columns before you specify the table body. When you start specifying cells, FOP requires that each row have the same number of cells as the table has columns (though you can have one column span cells). Other processors might permit an empty cell, but FOP does no thinking for you, so it requires that you spell out everything. In the following simple example, notice that the table-column elements and the table-body element are the immediate descendents (the children) of the table element. The rows and cells are and must be, because table-body has to contain them, deeper descendents (grandchildren and great-grandchildren, as it were). fo:table table-layout=fixed fo:table-column column-width=2in/ fo:table-column column-width=2.5in/ fo:table-column column-width=2in/ fo:table-body fo:table-row fo:table-cell fo:block xsl:use-attribute-sets=footerleft Date prepared: xsl:value-of select=format-date(current-date(),'[D1] [MNn] [Y0001]')/ /fo:block /fo:table-cell fo:table-cell fo:block xsl:use-attribute-sets=footercenter Confidential and Proprietary /fo:block /fo:table-cell fo:table-cell fo:block xsl:use-attribute-sets=footerright fo:page-number/ /fo:block /fo:table-cell /fo:table-row /fo:table-body /fo:table HTH Jay Bryant Bryant Communication Services (on contract at Syngeristic Solution Technologies) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: HR in FOP
Assuming you have one-inch margins and a page with of 8.5 inches, the following FO element draws a one-point black line across the page: fo:leader leader-pattern=rule rule-thickness=1.0pt leader-length=6.5in color=black/ You can also set other properties, such as space-before and space-after. Here's an example that I use for lines in footers (to separate the rest of the page from the footer): At the top of the stylesheet, I have a bunch of elements similar to this one: xsl:attribute-set name=footerleader xsl:attribute name=leader-patternrule/xsl:attribute xsl:attribute name=rule-thickness1.0pt/xsl:attribute xsl:attribute name=leader-length6.5in/xsl:attribute xsl:attribute name=space-before.optimum0pt/xsl:attribute xsl:attribute name=space-after.optimum24pt/xsl:attribute xsl:attribute name=colorblack/xsl:attribute /xsl:attribute-set That way, I can maintain styles in one place within the stylesheet (and I could maintain them in a separate file and import them, if need be). Later, when I actually want a line across the page, I then use: fo:leader xsl:use-attribute-sets=footerleader/ You do not need to use one-cell tables and external graphics to get a simple (or not-s-simple) line. HTH Jay Bryant Bryant Communication Services (on contract at Synergistic Solution Technologies) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Always on page 52 - No meaningful layout in block after many attempts.
Just a thought - have you tried giving FOP more memory to use? If you use the batch file, you can modify the line that invokes FOP to include the -Xmx switch, so that it looks something like this: java -Xmx512m -cp %LOCALCLASSPATH% org.apache.fop.apps.Fop %1 %2 %3 %4 %5 %6 %7 %8 %9 That gives it a half gig to play with. I found that I had use the -Xmx switch to be able to produce large documents, but now I can produce 1700-page documents (in particular, a data dictionary for a large data warehouse). Good luck. Jay Bryant Bryant Communication Services Daniel Durgin [EMAIL PROTECTED] 01/03/2005 12:11 PM Please respond to [EMAIL PROTECTED] To [EMAIL PROTECTED] cc Subject Always on page 52 - No meaningful layout in block after many attempts. Hi everyone, I have been using FOP for about 9 months, off and on. I have never had this problem before. No matter what I do, FOP craps out at page 52. I can use more white space or less white space (i.e. more/less records per a page), doesn't matter. There are not that many records, only about 2800. No graphics, just text. I have tried PDF and PS output, the same error each time. If I limit the number of records (php script that creates xml file) so it won't make enough records for 52 pages, it works like a charm. Output: [DEBUG] Input mode: [DEBUG] xslt transformation [DEBUG] xml input file: StapleBook-2005-01-03.xml [DEBUG] xslt stylesheet: StapleSheetPage.xsl [DEBUG] Output mode: [DEBUG] pdf [DEBUG] output file: StapleSheet.pdf [DEBUG] OPTIONS [DEBUG] no user configuration file is used [default] [DEBUG] debug mode on [DEBUG] dump configuration [DEBUG] quiet mode on [INFO] Using org.apache.xerces.parsers.SAXParser as SAX2 Parser [INFO] base directory: file:/home/shared/Dan/RenysScripts/XML/ [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] [WARNING] Some static content could not fit in the area. ... (repeats for pages in between) ... [WARNING] Some static content could not fit in the area. [INFO] [52] [INFO] [52] [ERROR] org.apache.fop.apps.FOPException: No meaningful layout in block after many attempts. Infinite loop is assumed. Processing halted. org.apache.fop.apps.FOPException: org.apache.fop.apps.FOPException: No meaningful layout in block after many attempts. Infinite loop is assumed. Processing halted. at org.apache.fop.apps.CommandLineStarter.run(CommandLineStarter.java:111) at org.apache.fop.apps.Fop.main(Fop.java:62) Here is the XSL. Sorry about including the entire stylesheet, but I have been stumped for days, and not sure what is fouling things up. Yes I have checked google and the archive. ?xml version=1.0 encoding=UTF-8? xsl:stylesheet xmlns:xsl=http://www.w3.org/1999/XSL/Transform; xmlns:fo=http://www.w3.org/1999/XSL/Format; xmlns:xalan=http://xml.apache.org/xalan; exclude-result-prefixes=xalan version=1.0 xsl:template match=/ fo:root xmlns:fo=http://www.w3.org/1999/XSL/Format; xmlns:msxsl=urn:schemas-microsoft-com:xslt fo:layout-master-set fo:simple-page-master master-name=page1 page-height=11in page-width=8.5in margin-top=0.5in margin-bottom=0.5in margin-left=.25in margin-right=.25in fo:region-body margin-top=0.60in margin-bottom=0.5in margin-left=0.25in margin-right=0.25in column-count=3 column-gap=.25in / fo:region-before extent=0.5in background-color=#489838/ fo:region-after extent=0.25in/ /fo:simple-page-master fo:simple-page-master master-name=page2 page-height=11in page-width=8.5in margin-top=0.5in margin-bottom=.5in margin-left=.25in margin-right=.25in fo:region-body margin-top=0.25in margin-bottom=0.5in margin-left=0.25in margin-right=0.25in column-count=2 column-gap=.25in / fo:region-before extent=0.00in/ fo:region-after extent=0.25in/ /fo:simple-page-master fo:page-sequence-master master-name=document fo:repeatable-page-master-alternatives fo:conditional-page-master-reference page-position=first master-reference=page1/ fo:conditional-page-master-reference page-position=rest master-reference=page2/ /fo:repeatable-page-master-alternatives /fo:page-sequence-master /fo:layout-master-set fo:page-sequence master-reference=document fo:static-content flow-name=xsl-region-before fo:block color=black
Re: Breaking between rows before breaking rows
From all that I have read (and tried myself), you've just hit FOP in its weakest spot. The only think I can suggest is to chunk your content such that a table never crosses a page boundary. Hopefully, the new effort on FOP (about which I know very little) will do better with keeps and breaks. By the way, I love FOP for all that it lets me do, so I accept that it has a few limitations. Jay Bryant Bryant Communication Services robert frapples [EMAIL PROTECTED] 12/10/2004 11:50 AM Please respond to [EMAIL PROTECTED] To [EMAIL PROTECTED] cc Subject Breaking between rows before breaking rows I have a bunch of tables, each with a bunch of rows, each with some content. I set keep-with-next='1' for each row, expecting it to page break between tables, which it does. . . for the most part. If a single table is longer than one page, rather than breaking between rows, it breaks in the middle of a row. Can I keep rows together when possible and break between tables AND not break in the middle of a row? Is there some trick to do this? -Stephen - 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: setting up tables differently based on existance of xml tags. (static variables, recursion, templates, and intrigue)
Couple things: First, I'd dump this topic on the XSL list. Those folks love this kind of question, and they are good at helping with this kind of issue. Second, I'd look at making a key to hold the field-that-has-a-value-and-whose-next-sibling-has-a-value combos. Then, rather than read the whole document, the processor would read the key. If it works, that should reduce memory usage and increase performance. Jay Bryant Bryant Communication Services robert frapples [EMAIL PROTECTED] 11/30/2004 03:09 PM Please respond to [EMAIL PROTECTED] To [EMAIL PROTECTED] cc Subject setting up tables differently based on existance of xml tags. (static variables, recursion, templates, and intrigue) Here's a (hopefully) interesting problem: (I've been editing this email every day. Every time I can't figure out how to do something, I come up with an alternate plan, assisted by a few people in #xml on irc.freenode.net. (Thank you Bebabo). I figured at this point I'd share my experiences. If you can think of better, faster, cleaner ways to do this, I'd love to hear from you.) source xml: document field titlea/title /field field titleb/title value/ field titlec/title value/ /field field titled/title /field field titlee/title value/ /field /document What I want to happen is basically, for-each select=field, if field has a value/ and the next field also has a value, have 4 cells in a row: field[n]/title, text , field[n+1]/title, 'text'. If field does not have a value/ or if the next field does not have a value/, then have 2 cells: field[n]/title, and 'other text' with number-columns-spanned=3. My first thought was this: /-\ . . . xsl:variable name=col select=''/ xsl:table-body xsl:for-each select=field xsl:choose xsl:when test=value and not($col) fo:table-row fo:table-cellxsl:value-of select=title//fo:table-cell fo:table-celltext/fo:table-cell xsl:variable name=col select='true'/ /xsl:when xsl:when test=value and $col fo:table-cellxsl:value-of select=title//fo:table-cell fo:table-celltext/fo:table-cell /fo:table-row xsl:variable name=col select=''/ /xsl:when xsl:when test=not(value) and not($col) fo:table-row fo:table-cellxsl:value-of select=title//fo:table-cell fo:table-cellother text/fo:table-cell fo:table-cell number-columns-spanned=2/ /fo:table-row /xsl:when xsl:when test=not(value) and $col fo:table-cell number-columns-spanned=2/ /fo:table-row fo:table-row fo:table-cellxsl:value-of select=title//fo:table-cell fo:table-cellother text/fo:table-cell fo:table-cell number-columns-spanned=2/ /fo:table-row xsl:variable name=col select=''/ /xsl:when /xsl:choose /xsl:for-each /fo:table-body \---/ This obviously will not work, because XSLT does not allow variables to be reassigned. After reading extensively from O'Reilly's XSLT book and the w3c specs for XSLT and XPath, I decided I could achive my goal with recursive template matches. Here is what I arrived at: /\ xsl:stylesheet . . . xsl:template match=document . . . fo:table-body xsl:apply-templates select=field[1] /fo:table-body . . . /xsl:template !-- end template match=document -- xsl:template match=field xsl:choose !-- When current field has value/ and next field has value/ -- xsl:when test=value and following-sibling::field[1]/value fo:table-row fo:table-cell !-- current title -- fo:blockxsl:value-of select=title//fo:block /fo:table-cell fo:table-cell fo:blocktext/fo:block /fo:table-cell fo:table-cell !-- next title -- fo:blockxsl:value-of select=following-sibling::field[1]/title//fo:block /fo:table-cell fo:table-cell fo:blocktext/fo:block /fo:table-cell /fo:table-row !-- use this template for the next element (after the one previously referred to as 'next'. omitting the final '[1]' will cause this template to be processed remaining field, which results in very long files with lots of stuff i don't want. -- xsl:apply-templates
Re: setting up tables differently based on existance of xml tags. (static variables, recursion, templates, and intrigue)
Forgot to add the URL for the XSL list: http://www.mulberrytech.com/xsl/xsl-list/ Jay Bryant Bryant Communication Services robert frapples [EMAIL PROTECTED] 11/30/2004 03:09 PM Please respond to [EMAIL PROTECTED] To [EMAIL PROTECTED] cc Subject setting up tables differently based on existance of xml tags. (static variables, recursion, templates, and intrigue) Here's a (hopefully) interesting problem: (I've been editing this email every day. Every time I can't figure out how to do something, I come up with an alternate plan, assisted by a few people in #xml on irc.freenode.net. (Thank you Bebabo). I figured at this point I'd share my experiences. If you can think of better, faster, cleaner ways to do this, I'd love to hear from you.) source xml: document field titlea/title /field field titleb/title value/ field titlec/title value/ /field field titled/title /field field titlee/title value/ /field /document What I want to happen is basically, for-each select=field, if field has a value/ and the next field also has a value, have 4 cells in a row: field[n]/title, text , field[n+1]/title, 'text'. If field does not have a value/ or if the next field does not have a value/, then have 2 cells: field[n]/title, and 'other text' with number-columns-spanned=3. My first thought was this: /-\ . . . xsl:variable name=col select=''/ xsl:table-body xsl:for-each select=field xsl:choose xsl:when test=value and not($col) fo:table-row fo:table-cellxsl:value-of select=title//fo:table-cell fo:table-celltext/fo:table-cell xsl:variable name=col select='true'/ /xsl:when xsl:when test=value and $col fo:table-cellxsl:value-of select=title//fo:table-cell fo:table-celltext/fo:table-cell /fo:table-row xsl:variable name=col select=''/ /xsl:when xsl:when test=not(value) and not($col) fo:table-row fo:table-cellxsl:value-of select=title//fo:table-cell fo:table-cellother text/fo:table-cell fo:table-cell number-columns-spanned=2/ /fo:table-row /xsl:when xsl:when test=not(value) and $col fo:table-cell number-columns-spanned=2/ /fo:table-row fo:table-row fo:table-cellxsl:value-of select=title//fo:table-cell fo:table-cellother text/fo:table-cell fo:table-cell number-columns-spanned=2/ /fo:table-row xsl:variable name=col select=''/ /xsl:when /xsl:choose /xsl:for-each /fo:table-body \---/ This obviously will not work, because XSLT does not allow variables to be reassigned. After reading extensively from O'Reilly's XSLT book and the w3c specs for XSLT and XPath, I decided I could achive my goal with recursive template matches. Here is what I arrived at: /\ xsl:stylesheet . . . xsl:template match=document . . . fo:table-body xsl:apply-templates select=field[1] /fo:table-body . . . /xsl:template !-- end template match=document -- xsl:template match=field xsl:choose !-- When current field has value/ and next field has value/ -- xsl:when test=value and following-sibling::field[1]/value fo:table-row fo:table-cell !-- current title -- fo:blockxsl:value-of select=title//fo:block /fo:table-cell fo:table-cell fo:blocktext/fo:block /fo:table-cell fo:table-cell !-- next title -- fo:blockxsl:value-of select=following-sibling::field[1]/title//fo:block /fo:table-cell fo:table-cell fo:blocktext/fo:block /fo:table-cell /fo:table-row !-- use this template for the next element (after the one previously referred to as 'next'. omitting the final '[1]' will cause this template to be processed remaining field, which results in very long files with lots of stuff i don't want. -- xsl:apply-templates select=following-sibling::field[position() gt; 1][1]/ /xsl:when !-- if not. . . -- xsl:otherwise fo:table-row fo:table-cell fo:blockxsl:value-of select=title//fo:block /fo:table-cell fo:table-cell
JCE present but not working
Hi, all, Here's the scoop: * I am trying to get encryption to work in FOP. * I am using Windows XP, Java 1.4.1_02, and FOP 0.20.5. * I have downloaded bcprov-jdk14-125.jar from Bouncy Castle and have put that jar file in fop-0.20.5\lib. * I have modified build.bat to include the following line in the classpath list: set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\bcprov-jdk14-125.jar * I have modified j2sdk1.4.1_02\jre\lib\security\java.security to include the following line: security.provider.6=org.bouncycastle.jce.provider.BouncyCastleProvider * When I ran build.bat, it ended with the happy BUILD SUCCESSFUL message, and the build output included the following happy lines: prepare-jce: [echo] JCE is present. Installing PDF encryption support. * I have modified fop.bat to include the following line in the classpath list: set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\bcprov-jdk14-125.jar * However, when I run FOP to try to create a PDF file with encryption options set, I still get this unhappy message: [ERROR] Cannot find any provider supporting RC4 What have I not done or done wrong? Thanks. Jay Bryant - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: JCE present but not working
You were correct, Andreas. Your first e-mail made me wonder if I had Java installed in more than one place, and I do. I had modified the java.security file for the wrong one. I have inherited this machine, and under a big enough time crunch that I cannot wipe its drives and build it up as I would like. Consequently, there are tools (some of which I use and some of which I don't) scattered all over the place. Thanks for the help. Jay Bryant Andreas L. Delmelle [EMAIL PROTECTED] 11/23/2004 04:24 PM Please respond to [EMAIL PROTECTED] To [EMAIL PROTECTED] cc Subject RE: JCE present but not working -Original Message- From: Andreas L. Delmelle [mailto:[EMAIL PROTECTED] ... (probably) wrong location again. It's far more likely that you have a separate Java Runtime under Program Files somewhere (--the one your %JAVA_HOME% refers to). Hmm... A bit more precise: the Java Runtime from which the 'bin' directory appears first in your %PATH% environment var Greetz, Andreas - 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]