conditional drawning of table
Hi , in my xsl i have a condition: xsl:choose xsl:when test=count(/report/listElements/element) gt; 0 i draw a table with a border in the bottom /xsl:when xsl:otherwise i draw the same table but without the border at the bottom /xsl:otherwise /xsl:choose well that's easy ; there is no problem there ; just the table is consequent and i have 8 table in pdf and don't want to duplicate the code. anyway to do this in an better way ? and thanks
RE: conditional drawning of table
If the only difference is the border, don't put the condition around the table. Use the condition on just the border, with an xsl:variable or xsl:attribute. From: Red Light [mailto:skydelt...@yahoo.com] Sent: Wednesday, March 17, 2010 10:12 AM To: fop-users@xmlgraphics.apache.org Subject: conditional drawning of table Hi , in my xsl i have a condition: xsl:choose xsl:when test=count(/report/listElements/element) gt; 0 i draw a table with a border in the bottom /xsl:when xsl:otherwise i draw the same table but without the border at the bottom /xsl:otherwise /xsl:choose well that's easy ; there is no problem there ; just the table is consequent and i have 8 table in pdf and don't want to duplicate the code. anyway to do this in an better way ? and thanks
RE: conditional drawning of table
Here you go (or at least I think this is what you are looking for), xsl:template name=tableCondition xsl:choose xsl:when test=count(/report/listElements/element) gt; 0 i draw a table with a border in the bottom /xsl:when xsl:otherwise i draw the same table but without the border at the bottom /xsl:otherwise /xsl:choose /xsl:template Use the following to call it where ever you want. xsl:call-template name= tableCondition / Your test should be fine as long it as it will give you the same result each time. Marijan (Mario) Madunic Publishing Specialist New Flyer Industries From: Red Light [mailto:skydelt...@yahoo.com] Sent: Wednesday, March 17, 2010 9:12 AM To: fop-users@xmlgraphics.apache.org Subject: conditional drawning of table Hi , in my xsl i have a condition: xsl:choose xsl:when test=count(/report/listElements/element) gt; 0 i draw a table with a border in the bottom /xsl:when xsl:otherwise i draw the same table but without the border at the bottom /xsl:otherwise /xsl:choose well that's easy ; there is no problem there ; just the table is consequent and i have 8 table in pdf and don't want to duplicate the code. anyway to do this in an better way ? and thanks Please consider the environment before printing this e-mail. CONFIDENTIALITY STATEMENT: This communication (and any and all information or material transmitted with this communication) is confidential, may be privileged and is intended only for the use of the intended recipient. If you are not the intended recipient, any review, retransmission, circulation, distribution, reproduction, conversion to hard copy, copying or other use of this communication, information or material is strictly prohibited and may be illegal. If you received this communication in error or if it is forwarded to you without the express authorization of New Flyer, please notify us immediately by telephone or by return email and permanently delete the communication, information and material from any computer, disk drive, diskette or other storage device or media. Thank you. - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
RE: conditional drawning of table
ok thanks guys
Re: conditional drawning of table
Try: xsl:if test=count(/report/listElements/element) gt; 0 xsl:attribute name=border-bottomwhatever/xsl:attribute /xsl:if -Lou Red Light skydelt...@yahoo.com wrote on 03/17/2010 10:12:13 AM: Hi , in my xsl i have a condition: xsl:choose xsl:when test=count(/report/listElements/element) gt; 0 i draw a table with a border in the bottom /xsl:when xsl:otherwise i draw the same table but without the border at the bottom /xsl:otherwise /xsl:choose well that's easy ; there is no problem there ; just the table is consequent and i have 8 table in pdf and don't want to duplicate the code. anyway to do this in an better way ? and thanks
RE: conditional drawning of table
Red Light you can combine what Louis and Eric have suggested with the named template and now you can just call the named template with the if test. xsl:template name=tableCondition fo:table xsl:if test=count(/report/listElements/element) gt; 0 xsl:attribute name=border-bottomwhatever/xsl:attribute /xsl:if Test of table here... fo:table /xsl:template xsl:call-template name=tableCondition / Marijan (Mario) Madunic Publishing Specialist New Flyer Industries From: louis.mast...@log-net.com [mailto:louis.mast...@log-net.com] Sent: Wednesday, March 17, 2010 9:28 AM To: fop-users@xmlgraphics.apache.org Subject: Re: conditional drawning of table Try: xsl:if test=count(/report/listElements/element) gt; 0 xsl:attribute name=border-bottomwhatever/xsl:attribute /xsl:if -Lou Red Light skydelt...@yahoo.com wrote on 03/17/2010 10:12:13 AM: Hi , in my xsl i have a condition: xsl:choose xsl:when test=count(/report/listElements/element) gt; 0 i draw a table with a border in the bottom /xsl:when xsl:otherwise i draw the same table but without the border at the bottom /xsl:otherwise /xsl:choose well that's easy ; there is no problem there ; just the table is consequent and i have 8 table in pdf and don't want to duplicate the code. anyway to do this in an better way ? and thanks Please consider the environment before printing this e-mail. CONFIDENTIALITY STATEMENT: This communication (and any and all information or material transmitted with this communication) is confidential, may be privileged and is intended only for the use of the intended recipient. If you are not the intended recipient, any review, retransmission, circulation, distribution, reproduction, conversion to hard copy, copying or other use of this communication, information or material is strictly prohibited and may be illegal. If you received this communication in error or if it is forwarded to you without the express authorization of New Flyer, please notify us immediately by telephone or by return email and permanently delete the communication, information and material from any computer, disk drive, diskette or other storage device or media. Thank you. - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
Re: table border-collapse=collapse and borders
sos
RTF output: spaces added after { } \ characters
Hi Everyone, I'm using FOP to generate RTF output. The problem I'm having is that FOP adds a space after each of the following three characters in RTF output: { } \. In PDF output it does not add spaces after these characters. It seems to only be on these characters, though I haven't done a thorough test of other characters. Does anyone know why FOP might be doing this or if there is a workaround to make it stop adding spaces in RTF output? Thanks, Josh -- View this message in context: http://old.nabble.com/RTF-output%3A-spaces-added-after-%7B-%7D-%5C-characters-tp27937568p27937568.html Sent from the FOP - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
Re: XMLFilterImpl producing SVG instream-foreign-object
Andreas, Thanks for confirming! Yes indeed i found out i had to bypass the startDocument method - still smells a bit, but then again fish is tasty What i am making is a possibility to include PlantUML ( http://plantuml.sourceforge.net/) UML diagrams in the FOP rendering uml-diagram format=svg ... @startuml Alice - Bob: Authentication Request Bob -- Alice: Authentication Response Alice - Bob: Another authentication Request Alice -- Bob: another authentication Response @enduml /uml-diagram I get the basic UML diagram, just need to work a bit on the size (hopefully next weekend ). What would be a way to make it a more structural solution (like barcode etc) so perhaps other people can use it as well? tx., On Tue, Mar 16, 2010 at 7:44 PM, Andreas Delmelle andreas.delme...@telenet.be wrote: On 15 Mar 2010, at 07:35, Raphael Parree wrote: Hi Raphael I have meanwhiel found a way of making it work - i am sure there must be a better way; what i'm doing below smells pretty bad... I SAX parse the SVG and propagate its SAX events to the XmlFilter's parent content handler: The key reason, I think, the chosen approach is working (where your original cited approach wasn't), is simply because it does not propagate the startDocument() and endDocument() events to the parent. (Interesting to note that FOP needs to do the exact opposite at parse-time: the embedded SVG comes in as just another startElement(), and the child events are then routed to a delegate ContentHandler, precisely because raising startDocument() more than once on the same ContentHandler would lead to an exception.) Maybe it would be slightly better to define an explicit DefaultHandler subclass, as opposed to using anonymous overrides, but the net effect would be the same. IMO, it would look nicer, and would definitely be preferable over your current solution if you need the same approach in multiple places, but the bottom line is that your solution is correct. It smells a bit fishy maybe, but using an intermediate DefaultHandler that swallows startDocument() and endDocument() definitely seems like the most straightforward way to tackle this issue. HTH! Regards, Andreas Delmelle --- - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org -- Raphael Parree CTO SOA Evangelist phone +33 673 75 34 62 Disclaimer... The information contained in this message may be confidential and is intended to be exclusively for the addressee. Sender's written permission is needed prior to forwarding or otherwise using the content of the message, whether completely or partially. Should you receive this message unintentionally, please do not use the contents herein and notify the sender immediately by return e-mail. Please rely on your own virus checking, no responsibility is taken by the sender for any damage rising out of any bug or virus infection.