block with relative position?
Is it possible to define a block or block-container and give it a relative position? For instance, I need to have a block lay out at the current position, and then shift/float it a set amount relative to this. Is this at all possible? Thanks, Mike __ Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages! http://promotions.yahoo.com/new_mail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
shifting a table to the left
I am trying to figure out how to shift a table side to side on a page, similar to how start-indent can shift the text starting point. I have a page layout with a wide left margin that can be used for side headings. When I need a side heading, I had intended to use a 2 column table, put the heading in the 1st column, the paragraph text in the 2nd column, and then shift the whole table to the left with negative offset to line everything up. If I use a negative start-indent on the block or table, the text starting point moves to the left, but since the table stays put, the text right margin doesn't move over with it, it effectively stays with the table, which hasn't moved. end-indent has no effect. Is there any way to cause the whole table to shift to the left, so that the table-cells will enforce the text margins? Thanks, Mike Kellstrand __ Do you Yahoo!? New and Improved Yahoo! Mail - 100MB free storage! http://promotions.yahoo.com/new_mail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: shifting a table to the left
OK, although I have not been able to get the table itself to shift to the left, I have been able to find a combination of start-indent and end-indent attribs at the right spots to visually do exactly what I need. If anyone can shift the table itself, then that would be the nicer solution. Thanks, Mike --- Mike Kellstrand [EMAIL PROTECTED] wrote: I am trying to figure out how to shift a table side to side on a page, similar to how start-indent can shift the text starting point. I have a page layout with a wide left margin that can be used for side headings. When I need a side heading, I had intended to use a 2 column table, put the heading in the 1st column, the paragraph text in the 2nd column, and then shift the whole table to the left with negative offset to line everything up. If I use a negative start-indent on the block or table, the text starting point moves to the left, but since the table stays put, the text right margin doesn't move over with it, it effectively stays with the table, which hasn't moved. end-indent has no effect. Is there any way to cause the whole table to shift to the left, so that the table-cells will enforce the text margins? Thanks, Mike Kellstrand __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: shifting a table to the left
OK, here is my solution. I'm doing more interesting things in the actual table cell content, but you guys won't care about that, so I've altered it to just put text in each cell. Mike !-- = -- !-- -- !-- processCrossAlignHeader -- !-- -- !-- On a page layout with a wide left margin for this purpose, this template -- !-- will put a heading to the left of the main content flow, aligned with the -- !-- first line of the content. -- !-- -- !-- This is done by creating a 3 column table to hold the header and content, -- !-- and then shifting it to the left by the right amount. We need 3-- !-- columns so we can have a middle gutter column. -- !-- -- !-- I was unable to find a way to shift the table itself, so I used a -- !-- combination of start-indent and end-indent attributes on the table and-- !-- blocks that create a set of virtual margins to constrain the text flows -- !-- to where the table-cells would be, if we could simply shift the whole -- !-- table over. -- !-- -- !-- @param headerNode the header node to cross align in the wide left margin -- !-- @param actNodethe activity node to put in the normal flow area-- !-- -- !-- = -- xsl:template name='processCrossAlignHeader' xsl:param name='headerNode' / xsl:param name='actNode' / !-- The widths of the 3 comumns, per the page master -- xsl:variable name=headerColWidth(8pc + 6.75pt)/xsl:variable xsl:variable name=gutterColWidth(1pc + 3pt)/xsl:variable xsl:variable name=bodyColWidth(29pc + 5.25pt)/xsl:variable !-- Shift all text to the left -- fo:block start-indent=-({$headerColWidth} + {$gutterColWidth}) fo:table table-layout=fixed !-- This column will hold the cross aligned header -- fo:table-column column-width={$headerColWidth}/ !-- This column is just a gutter between the other 2 columns -- fo:table-column column-width={$gutterColWidth}/ !-- This column will hold the paragraph content and will line up with the normal page flow -- !-- Note that its width is reduced by the shift amount to put the right margin at the correct place -- fo:table-column column-width={$bodyColWidth} - ({$headerColWidth} + {$gutterColWidth})/ fo:table-body fo:table-row !-- display the heading text -- fo:table-cell !-- set the correct right margin for the header -- fo:block end-indent=({$headerColWidth} + {$gutterColWidth}) xsl:value-of select=$headerNode/ /fo:block /fo:table-cell !-- dummy gutter -- fo:table-cell fo:block/fo:block /fo:table-cell !-- display the paragraph content text -- fo:table-cell fo:block xsl:value-of select=$actNode/ /fo:block /fo:table-cell /fo:table-row /fo:table-body /fo:table /fo:block /xsl:template --- Clay Leeds [EMAIL PROTECTED] wrote: Mike, On Jul 16, 2004, at 7:17 AM, Mike Kellstrand wrote: OK, although I have not been able to get the table itself to shift to the left, I have been able to find a combination of start-indent and end-indent attribs at the right spots to visually do exactly what I need. If anyone can shift the table itself, then that would be the nicer solution. Thanks, Mike Unfortunately, I don't have an idea for how to shift the table (other than having an extra column on the left that is not in use *except* when you want to 'shift' the table over). However, it might be nice to have your solution in the archives for others to use. :-) Web Maestro Clay __ Do you Yahoo!? Yahoo! Mail is new and improved - Check it out! http://promotions.yahoo.com/new_mail
Can I use pt and pc as measurement units
Can I specify page and spacing measurements in points (pt) and pica (pc) ? Googling around seems to indicate this is OK, but bad things are happening if I use them. So first off, is it legal to use pt and pc as measurement units in FOP and/or XSL? Thanks, Mike __ Do you Yahoo!? Yahoo! Mail - 50x more storage than other providers! http://promotions.yahoo.com/new_mail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Is there a way to get the width of the current region-body?
As I create a table and specify the column widths, it would be nice to know the width of the region-body to use in column width calculations. Is there any function that will return this value? Or do you have to set some layout variables at the top of the stylesheet and build off of those? Thanks, Mike __ Do you Yahoo!? Take Yahoo! Mail with you! Get it on your mobile phone. http://mobile.yahoo.com/maildemo - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Is there a way to get the width of the current region-body?
Yes, that was plan B. What I really need is the usable width, i.e. page-width - left-margin - right-margin. If FOP could cough that up it would be cool, otherwise as you said, I could define some variable(s) at the top and reference them. Thanks, Mike --- Clay Leeds [EMAIL PROTECTED] wrote: On Jun 17, 2004, at 8:25 AM, Mike Kellstrand wrote: As I create a table and specify the column widths, it would be nice to know the width of the region-body to use in column width calculations. Is there any function that will return this value? Or do you have to set some layout variables at the top of the stylesheet and build off of those? Thanks, Mike I doubt that FOP can do it per se, but you could define it using a variable in the simple-page-master: fo:simple-page-master master-name=repeating page-height=28cm page-width={$varRepeatingPageWidth}cm margin-top=1cm margin-bottom=1cm margin-left=1cm margin-right=0cm Then, you could check against the variable for the page-width variable: $varRepeatingPageWidth I hope this helps! Web Maestro Clay __ Do you Yahoo!? Yahoo! Mail - You care about security. So do we. http://promotions.yahoo.com/new_mail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Is there a way to get the width of the current region-body?
What I was interested in doing was taking the usable page width and dividing that by #columns so I could use this derived fixed column width for each fo:table-column column-width=? tag. I could use width=100% on the table, but I thought that the subsequent column-width=33% was not supported. Mike --- J.Pietschmann [EMAIL PROTECTED] wrote: Mike Kellstrand wrote: Yes, that was plan B. What I really need is the usable width, i.e. page-width - left-margin - right-margin. If FOP could cough that up it would be cool, otherwise as you said, I could define some variable(s) at the top and reference them. What's wrong with width=100% for the table? Have a look at proportional-column-width() too. J.Pietschmann __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Adding crop marks to 8.5x11 document printed on 11x17 paper
Some of my FOP layouts need to print right to the paper edge. I believe I have the FO correct, but the proof is in the printout. One way to check this is to print on larger paper with "crop marks" added to show where the 8.5x11 paper edge would be. I do not see any options in GSView or Adobe Reader to add these crop marks. Does anyone know how to do this? Thanks, Mike __Do You Yahoo!?Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
passing a node name as a param and then using it
I want to be able to pass a node name into a named template as a paramand then operate on it. When I try to use the node name param in the template, it gets interpreted as a string and not an actual node. i.e. The snipett: xsl:variable name="x" select="choice"/ fo:blocka: xsl:value-of select="choice[1]"//fo:block fo:blockb: xsl:value-of select="concat($x,'[1]')"//fo:block Will generate: a: {the actual xml data in the 1st choice node} b: choice[1] How do I get this to work as intended? Thanks, Mike Do you Yahoo!? Yahoo! Mail - You care about security. So do we.
Re: passing a node name as a param and then using it
You're right, just after I sent the question I realized I was off-topic, my apologies. Thank you for the 2 solutions though. I did try #2, evaluate() and it worked nicely. I will fiddle with the other solution as well to check out its limitations. Thanks, Mike --- J.Pietschmann [EMAIL PROTECTED] wrote: Mike Kellstrand wrote: I want to be able to pass a node name into a named template as a param and then operate on it. When I try to use the node name param in the template, it gets interpreted as a string and not an actual node. i.e. The snipett: xsl:variable name=x select=choice/ fo:blocka: xsl:value-of select=choice[1]//fo:block fo:blockb: xsl:value-of select=concat($x,'[1]')//fo:block Will generate: a: {the actual xml data in the 1st choice node} b: choice[1] That's exactly as it is supposed to work. Actually this is an XSLT question, only loosely related to FOP, and would have better been asked on the XSL list: http://www.mulberrytech.com/xsl/xsl-list/ Anyway: You expect the XSLT processor to perform what's called double evaluation: first evaluate concat($x,'[1]') into choice[1], then evaluate the latter again. That's not the way XPath expressions are handled. How do I get this to work as intended? Commonly, two approaches: 1. Use fo:blockb: xsl:value-of select=*[name()=$x][1]//fo:block Note that this approach works for your specific problem but wont help you in more general cases. 2. Most XSLT processors have an extension function which evaluatess a string as XPath expression, roughly like fo:blockb: xsl:value-of select=foo:evaluate(concat($x,'[1]'))/.. The exact function name and the necessary namespace are processor specific, check your processor's manual for details. J.Pietschmann __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Inexpensive printer that can print to paper edge and up to 11x17?
Some of my FO outputs put content right up to the edge of the paper. I'm looking for a low priced (but decent) printer that can print right to the paper edge and handle up to 11x17 inch paper, so I can proof my work. I thought I'd ask in case anyone had a recommendation. Thanks, Mike Do you Yahoo!?Friends. Fun. Try the all-new Yahoo! Messenger
Dimension math, i.e. width={$x+10}
I need to layout some blocks and SVG'susing dimensions based on input values. I can easily use theoriginal input values, i.e. width="{$x}", but I also need to do some calculations. For instance, if I want a box around my SVG, I need to either draw it in the SVG at 1px smaller or use a block-container at 1px larger. I've tried some examples I've found online (like width="{$x+10}" ), but FOP doesn't like it. What is the correct syntax for doing this type of thing? Thanks, Mike Do you Yahoo!?Friends. Fun. Try the all-new Yahoo! Messenger
Re: Dimension math, i.e. width={$x+10}
Clay, Thanks a lot, that did the trick for me. Not to nit-pick, but for posterity, the syntax I ended up with is: width="{concat(substring($width,1,string-length($width)-2)+10,'px')}" If anyone else wants to chime it with any of the subtler details of this stuff, feel free to educate me further. Thanks Clay, Mike Clay Leeds [EMAIL PROTECTED] wrote: On Jun 3, 2004, at 7:37 AM, Mike Kellstrand wrote: I need to layout some blocks and SVG'susing dimensions based on input values. I can easily use theoriginal input values, i.e. width="{$x}", but I also need to do some calculations. For instance, if I want a box around my SVG, I need to either draw it in the SVG at 1px smaller or use a block-container at 1px larger. I've tried some examples I've found online (like width="{$x+10}" ), but FOP doesn't like it. What is the correct syntax for doing this type of thing? Thanks, MikeI *think* the problem is that $x probably is equivalent to '1px' which is a string of the characters '1'+'p'+'x' and there may be difficulties with adding a number to a string. There is a recent discussion on this in the archives, where someone provided some insight into how I was not completely correct on that assumption with one aspect of XSL-FO (I don't recall exactly which at the moment) however, that discussion may not be appropriate for SVG calculation (I don't know).What should be possible, is for you to modify your system to strip the 'px' for the purposes of the calculation with something like:width="{concat(substring($x,length()-2)+10,'px')}"I *hope* that'll do the trick, but you should see where I'm trying to go with it...Hope this helps!Web Maestro Clay-To unsubscribe, e-mail: [EMAIL PROTECTED]For additional commands, e-mail: [EMAIL PROTECTED] Do you Yahoo!?Friends. Fun. Try the all-new Yahoo! Messenger
RE: Dimension math, i.e. width={$x+10}
Hi, A very interesting discussion. I tried the latest suggestion: height="{concat($height,'+10px')}" and got an error: [ERROR] svg graphic could not be built: null:-1The attribute 'height' of the element rect is invalidorg.apache.batik.bridge.BridgeException: null:-1The attribute 'height' of the element rect is invalid I guess it doesn't want to add numbers with units Thanks, Mike "Andreas L. Delmelle" [EMAIL PROTECTED] wrote: -Original Message- From: Mike Kellstrand [mailto:[EMAIL PROTECTED]Hi, Not to nit-pick, but for posterity, the syntax I ended up with is: width="{concat(substring($width,1,string-length($width)-2)+10,'px')}" If anyone else wants to chime it with any of the subtler details of thisstuff, feel free to educate me further.Well, Clay was right (and IIC, I'm the one who corrected Clay in the threadhe remembered) and the problem is actually that it's Xalan (or any otherXSLT processor for that matter) that can't add numbers to strings...You may want try:width="{concat($width,'+10px')}"In this way, the value of the width property that FOP gets to see is, forexample:width="1px+10px"in which case FOP should have no problem with it. Right now you're trimmingthe measurement units and have Xalan do the calculation, and FOP gets to seefor example:width="11px"which comes down to the same thing, of course, but wouldn't be usable if the'10px' were to be an _expression_ in itself rather than a literal value.HTH!Greetz,Andreas-To unsubscribe, e-mail: [EMAIL PROTECTED]For additional commands, e-mail: [EMAIL PROTECTED] Do you Yahoo!?Friends. Fun. Try the all-new Yahoo! Messenger
Re: Can I put formatting tags in the XML file?
Sweet! I knew it would be something simple. Thanks Chris, Mike Chris Bowditch [EMAIL PROTECTED] wrote: Mike Kellstrand wrote: This must be a common issue, but I haven't found a good solution after a lot of searching. The problem: I have an XML file containing a lot of text. (I'm working on book layouts) Sometimes a word here and there in the text needs to be bolded or underlined in the final PDF. Of course adding any kind of inline FO tags in the source XML gets real nasty. How is this best dealt with?Whats wrong with just placing tags around text you want to make bold in the output. In your XSLT that processes your XML just have a template that matches for these tags and output the appropriate FO. E.g.Chris Do you Yahoo!?Friends. Fun. Try the all-new Yahoo! Messenger
Printing to paper edge for a bleed tab
Is it possible in FO / FOP to print right up to the edge of the paper in the start and end regions? Using FOP I have not been able to get closer than about a 1/2 inch to the edge. I need to be able to print a "bleed tab", which is a coloredrectangular area on the page edgethat lets you see chapter divisions while looking at the edge of a book. Is this possible in FOP, and if not does anyone know of anyFO product that can do it? Thanks, Mike Kellstrand Do you Yahoo!?Friends. Fun. Try the all-new Yahoo! Messenger
Re: Printing to paper edge for a bleed tab
Mark, Well that is good news. Is there anything I need to do, other than setting the page margins to zero? Are you saying that a given document will print right up to the edge on one printer, but have 1/2 margin all around on another? Interesting. That does make sense Thanks for the help, MikeMark Williams [EMAIL PROTECTED] wrote: Hi Mike, This doesn't sound like a FOP problem, but a printer problem. We manage to get objects at the extremes of the pages in region-before etc, but whether they print depends on the printer capabilities. Cheers, Mark Williams - Original Message - From: Mike Kellstrand To: [EMAIL PROTECTED] Sent: Thursday, May 27, 2004 4:02 PM Subject: Printing to paper edge for a "bleed tab" Is it possible in FO / FOP to print right up to the edge of the paper in the start and end regions? Using FOP I have not been able to get closer than about a 1/2 inch to the edge. I need to be able to print a "bleed tab", which is a coloredrectangular area on the page edgethat lets you see chapter divisions while looking at the edge of a book. Is this possible in FOP, and if not does anyone know of anyFO product that can do it? Thanks, Mike Kellstrand Do you Yahoo!?Friends. Fun. Try the all-new Yahoo! Messenger__Do You Yahoo!?Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
Re: Printing to paper edge for a bleed tab
Mark, I'm using FOP to make the PDF file, then opening it in AcrobatReader and printing it from there. So do you use FOP to create a PDF file and then invoke Ghostscript to print it? Or does Ghostscript come into play at an earlier point? Thanks again! MikeMark Williams [EMAIL PROTECTED] wrote: As I understand it. But there's a couple of issues here. 1. You don't need to set your page margin to 0. The region-before etcshould place your object right to the page's edges if you set it to 0 2. How are you printing. If you render to PDF and print from acrobat then acrobat does some funny stuff with your margins and this could be a problem. Also, I think FOP's own print_renderer does the same sort of thing so it's never quite what you expect. We use Ghostscript to print and it makes no attempt to fiddle with your margins or anything else. It's happy to believe that you may actually know what you want. Ghostscript is open source (GPL I think) although there is also a commercial version. We find GPL works fine for us. Regards, Mark - Original Message - From: Mike Kellstrand To: [EMAIL PROTECTED] Sent: Thursday, May 27, 2004 5:15 PM Subject: Re: Printing to paper edge for a "bleed tab" Mark, Well that is good news. Is there anything I need to do, other than setting the page margins to zero? Are you saying that a given document will print right up to the edge on one printer, but have 1/2 margin all around on another? Interesting. That does make sense Thanks for the help, MikeMark Williams [EMAIL PROTECTED] wrote: Hi Mike, This doesn't sound like a FOP problem, but a printer problem. We manage to get objects at the extremes of the pages in region-before etc, but whether they print depends on the printer capabilities. Cheers, Mark Williams - Original Message ----- From: Mike Kellstrand To: [EMAIL PROTECTED] Sent: Thursday, May 27, 2004 4:02 PM Subject: Printing to paper edge for a "bleed tab" Is it possible in FO / FOP to print right up to the edge of the paper in the start and end regions? Using FOP I have not been able to get closer than about a 1/2 inch to the edge. I need to be able to print a "bleed tab", which is a coloredrectangular area on the page edgethat lets you see chapter divisions while looking at the edge of a book. Is this possible in FOP, and if not does anyone know of anyFO product that can do it? Thanks, Mike Kellstrand Do you Yahoo!?Friends. Fun. Try the all-new Yahoo! Messenger __Do You Yahoo!?Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com Do you Yahoo!?Friends. Fun. Try the all-new Yahoo! Messenger
Re: Printing to paper edge for a bleed tab
Mark, I ran the PDF through Ghostscript and it looks like it is doing the trick. I did notice that the same PDF printed in Ghostscript vs. Adobe print out with slightly different size fonts. Arg! :) Thanks a lot for the assistance, Mike Mark Williams [EMAIL PROTECTED] wrote: Fop to create and Ghostscript to print. Had a very frustrating time with acrobat trying to figure out why everything I sized and positioned was never accurate. Cheers Mark - Original Message - From: Mike Kellstrand To: [EMAIL PROTECTED] Sent: Thursday, May 27, 2004 6:01 PM Subject: Re: Printing to paper edge for a "bleed tab" Mark, I'm using FOP to make the PDF file, then opening it in AcrobatReader and printing it from there. So do you use FOP to create a PDF file and then invoke Ghostscript to print it? Or does Ghostscript come into play at an earlier point? Thanks again! MikeMark Williams [EMAIL PROTECTED] wrote: As I understand it. But there's a couple of issues here. 1. You don't need to set your page margin to 0. The region-before etcshould place your object right to the page's edges if you set it to 0 2. How are you printing. If you render to PDF and print from acrobat then acrobat does some funny stuff with your margins and this could be a problem. Also, I think FOP's own print_renderer does the same sort of thing so it's never quite what you expect. We use Ghostscript to print and it makes no attempt to fiddle with your margins or anything else. It's happy to believe that you may actually know what you want. Ghostscript is open source (GPL I think) although there is also a commercial version. We find GPL works fine for us. Regards, Mark Do you Yahoo!?Friends. Fun. Try the all-new Yahoo! Messenger
Can I put formatting tags in the XML file?
This must be a common issue, but I haven't found a good solution after a lot of searching. The problem: I have an XML file containing a lot of text. (I'm working on book layouts) Sometimes a word here and there in the text needs to be bolded or underlined in the final PDF. Of course adding any kind of inline FO tags in the source XML gets real nasty. How is this best dealt with? Many thanks, Mike Kellstrand Do you Yahoo!?Friends. Fun. Try the all-new Yahoo! Messenger
Solution: FOP code runs standalone, but not in a Servlet
Here is how I got FOP to run from a servlet. I did also have a subtle syntax error in my xslt file that was causing some of my troubles and leading me down the wrong path. I think this would be a good entry for the FAQ. Although I searched the web extensively, I never found this issue discussed. Several of you gave some very good ideas that led me to the correct answer. Thanks! This was for Tomcat 4.1.24 ... 1) I replaced the 2 existing jars in common/endorsed/ (xercesImpl.jar xmlParserAPIs.jar) with those from the latest Xerces release, 2.5.0 2) I also added xalan.jar from the latest Xalan release, 2.5.1 to common/endorsed/ 3) I added the FOP jars from fop-0.20.5 to shared/lib (fop.jar, batik.jar, avalon-framework-cvs-20020806.jar) Mike - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
How do I align a fo:block vertically to the bottom of the page?
I am constructing a cover page. I have a header and a footer. I have a couple blocks at the top of the page. I would like to have 2 blocks of test that that float down to the bottom of the page, sort of a vertical align bottom. These 2 blocks can hold text of varying length, so I don't want to fix them at a certain spot. I want the block to locate at the bottom and expand upward if neccessary. I've seen a couple similar requests answers in the archives, but none of them actually worked (for me). Any answers or ideas? Thanks, Mike - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Installing FOP for use in servlet under Tomcat
I have downloaded FOP from Apache and used it to write a xsl-fo java application. I added the FOP jars to the j2sdk/jre/lib/ext dir. Everything works fine. Now I want to use this code in a servlet. Where do I install the jars for Tomcat to use them? I've tried putting them in several different lib dirs, but the same code gets transform exceptions. I ran into this same problem last year. I spent a long time juggling jars around different lib dirs until I got the right combination. How do I add the FOP jars in so they work? Thanks! Mike
FOP code runs standalone, but not in a Servlet
This is a followup to a question earlier today. I have FOP code that runs great from the command line if I put the fop, batik, avalon, and xalan jars in the JAVA_HOME\jre\lib\ext dir. If I put this code in a servlet under Tomcat 4.1.24, I get transform errors. I have tried putting the FOP jars in various Tomcat lib dirs, in webapps with the servlet, etc. Everywhere I move these jars I get different amusing transform exceptions, but it doesn't run. 1) Where do the jars need to go? 2) Are there any parser jars that come with Tomcat that need to get removed. I tried removing the 2 jars that are in /common/endorsed, but that didn't help. Are there more hiding or embedded somewhere? This is driving me nuts! Many thanks! Mike
Re: FOP code runs standalone, but not in a Servlet
Thanks for the reply. I would think this would be a VFAQ, but I have seached the web extensively and not found a good definitive answer. I'm downloading the latest releases of xerces and xalan. I'll put the appropriate jars in the lib/endorsed dir and see if it works. Although there is still the very interesting question of why do the jars I have work from a stand-alone java program when placed in the jre\ext dir, but don't work from a servlet when placed in the lib\endorsed dir? Thanks, Mike - Original Message - From: J.Pietschmann [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, September 12, 2003 3:05 PM Subject: Re: FOP code runs standalone, but not in a Servlet Mike Kellstrand wrote: I have FOP code that runs great from the command line if I put the fop, batik, avalon, and xalan jars in the JAVA_HOME\jre\lib\ext dir. You should put the xerces and xalan jars in the lib/endorsed directory in order to override the buggy xalan release coming with older JDK 1.4 distributions. Getting the latest 1.4 release and disposing of the Xalan jar completely should work too. Also, make sure you have a recent Xalan jar in the FOP lib directory, pre 0.20.5rc3 FOP distributions came with Xalan releases which pretended to work for some buggy style sheets, causing problems with more recent Xalans. This all is a VFAQ. 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: FOP code runs standalone, but not in a Servlet
OK, I downloaded the latest xalan xerces, and installed the jars in the lib/endorsed dir. I ran the servlet and got: null:4:80 fo:flow must contain block-level children Does the endorsed dir get loaded first, or are there some parsers build into one of the Tomcat core jars that are running instead? Thanks, Mike - Original Message - From: Mike Kellstrand [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, September 12, 2003 3:43 PM Subject: Re: FOP code runs standalone, but not in a Servlet Thanks for the reply. I would think this would be a VFAQ, but I have seached the web extensively and not found a good definitive answer. I'm downloading the latest releases of xerces and xalan. I'll put the appropriate jars in the lib/endorsed dir and see if it works. Although there is still the very interesting question of why do the jars I have work from a stand-alone java program when placed in the jre\ext dir, but don't work from a servlet when placed in the lib\endorsed dir? Thanks, Mike - Original Message - From: J.Pietschmann [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, September 12, 2003 3:05 PM Subject: Re: FOP code runs standalone, but not in a Servlet Mike Kellstrand wrote: I have FOP code that runs great from the command line if I put the fop, batik, avalon, and xalan jars in the JAVA_HOME\jre\lib\ext dir. You should put the xerces and xalan jars in the lib/endorsed directory in order to override the buggy xalan release coming with older JDK 1.4 distributions. Getting the latest 1.4 release and disposing of the Xalan jar completely should work too. Also, make sure you have a recent Xalan jar in the FOP lib directory, pre 0.20.5rc3 FOP distributions came with Xalan releases which pretended to work for some buggy style sheets, causing problems with more recent Xalans. This all is a VFAQ. J.Pietschmann - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]