RE: Passing parameters to XSL file throgh Java Application
Hi, XSLTInputHandler does not provide any methods to pass parameters to the xsl file. But in the XSLTInputHandler there is a method called "public XMLReader getParser()" This method actually handles A "Transformer Object". I would suggest you to go through this class. It is available at "FOPROOT\src\org\apache\fop\apps\XSLTInputHandler.java" I think there is a possibility of extending XSLTInputHandler and include your functionality by overriding the "public XMLReader getParser()" method. If you get a better solution do let us know regards Balajee Chandrasekaran -Original Message- From: sujata shetty [mailto:[EMAIL PROTECTED]] Sent: Tuesday, October 08, 2002 11:49 AM To: [EMAIL PROTECTED] Subject: RE: Passing parameters to XSL file throgh Java Application Hi Balajee, Thanks for the reply. The code of TransformerFactory is working fine if the file transformation is either to HTMl or CSV. But in case of PDF it is not working. I am using the below code (FOP) for PDF transformation. Driver driver = new Driver(); driver.setRenderer(Driver.RENDER_PDF); InputHandler inputHandler = new XSLTInputHandler(new File(xmlFile), new File(xslFile)); org.xml.sax.XMLReader parser = inputHandler.getParser(); driver.setOutputStream(new FileOutputStream(outFile)); driver.render(parser, inputHandler.getInputSource()); But I don't know, How do I pass paramters in the above mentioned code Thanks and Regards, Sujata --- Balajee Chandrasekaran <[EMAIL PROTECTED]> wrote: > Following code snippet Enables parameter passing > through Java > > TransformerFactory tFactory = > TransformerFactory.newInstance(); > Transformer transformer = > tFactory.newTransformer(new > StreamSource("foo.xsl")); > // Set the parameter. > transformer.setParameter("param1",/* parameter > name */ paramValue /* parameter value */ ); > transformer.transform(new > StreamSource("foo.xml"), new > StreamResult(System.out)); > > Hope this helps. > > regards > Balajee Chandrasekaran > > -Original Message- > From: sujata shetty [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, October 08, 2002 11:19 AM > To: [EMAIL PROTECTED] > Subject: Passing parameters to XSL file throgh Java > Application > > > Hi, > I am creating a PDF file from an XML throgh XSL FO > stylesheet. > It is working fine. > BUt I need to pass some parameters to XSL sheet > through JAVA program. > If parameter passing is done through XML > Transformer, > It will not transform to PDF and I am anable to open > PDF file. > Can anyone help me out in passing parameters to XSL > through JAVA to create PDF file? > > > Thanks and Regards, > Sujata > > __ > Do You Yahoo!? > Everything you'll ever need on one web page > from News and Sport to Email and Music Charts > http://uk.my.yahoo.com > > > MASTEK > Investing in relationships > In the US, we're called MAJESCO > > ~~ > Opinions expressed in this e-mail are those of the > individual and not that of Mastek Limited, unless > specifically indicated to that effect. Mastek > Limited does not accept any responsibility or > liability for it. This e-mail and attachments (if > any) transmitted with it are confidential and/or > privileged and solely for the use of the intended > person or entity to which it is addressed. Any > review, re-transmission, dissemination or other use > of or taking of any action in reliance upon this > information by persons or entities other than the > intended recipient is prohibited. This e-mail and > its attachments have been scanned for the presence > of computer viruses. It is the responsibility of the > recipient to run the virus check on e-mails and > attachments before opening them. If you have > received this e-mail in error, kindly delete this > e-mail from all computers. > ~~ > __ Do You Yahoo!? Everything you'll ever need on one web page from News and Sport to Email and Music Charts http://uk.my.yahoo.com MASTEK Investing in relationships In the US, we're called MAJESCO ~~ Opinions expressed in this e-mail are those of the individual and not that of Mastek Limited, unless specifically indicated to that effect. Mastek Limited does not accept any responsibility or liability
Font Width
Hi All, I want to change the font width of my report. Basically I want to accomodate more charaters perline of the report. So I beleive I have to reduce the font width of the characters so as to squeeze in more characters. I'm usinf FOP 0.20.4. I tried using "fot-stretch" property. But FOP gave me [ERROR] property - "font-stretch" is not implemented yet. I saw the xslfoRef.pdf that came with FOP 0.20.4 download, It did mention "font-stretch" property usage. My FO content is something like this Extensible Markup Language (XML) 1.0 Is there any errorin my usage of the property?? How else can i acheive my objective? Thanks in advance for the help regards Balajee Chandrasekaran MASTEK Investing in relationships In the US, we're called MAJESCO ~~ Opinions expressed in this e-mail are those of the individual and not that of Mastek Limited, unless specifically indicated to that effect. Mastek Limited does not accept any responsibility or liability for it. This e-mail and attachments (if any) transmitted with it are confidential and/or privileged and solely for the use of the intended person or entity to which it is addressed. Any review, re-transmission, dissemination or other use of or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. This e-mail and its attachments have been scanned for the presence of computer viruses. It is the responsibility of the recipient to run the virus check on e-mails and attachments before opening them. If you have received this e-mail in error, kindly delete this e-mail from all computers. ~~ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Text at th end of a page.
Hi, I want to display a paragraph at the bottom of a page. I have defined my page footer. The paragraph that I want to display is not a part of the page footer, but i want it to be placed always at the bottom of the page, even if the page is blank. thanks in advance regards Balajee Chandrasekaran MASTEK Investing in relationships In the US, we're called MAJESCO ~~ Opinions expressed in this e-mail are those of the individual and not that of Mastek Limited, unless specifically indicated to that effect. Mastek Limited does not accept any responsibility or liability for it. This e-mail and attachments (if any) transmitted with it are confidential and/or privileged and solely for the use of the intended person or entity to which it is addressed. Any review, re-transmission, dissemination or other use of or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. This e-mail and its attachments have been scanned for the presence of computer viruses. It is the responsibility of the recipient to run the virus check on e-mails and attachments before opening them. If you have received this e-mail in error, kindly delete this e-mail from all computers. ~~ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: Displaying Contents on the same line.
Hi Guy, Thanks it worked. regards Balajee Chandrasekaran -Original Message- From: Guy D'haenens [mailto:[EMAIL PROTECTED]] Sent: Wednesday, October 02, 2002 3:22 PM To: [EMAIL PROTECTED] Subject: Re: Displaying Contents on the same line. You could use a table with 2 columns. In the first column, set the text alignment to left, in the second column, set the text alignment to right. Sometimes life can be easy ;-) - Original Message - From: "Balajee Chandrasekaran" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, October 02, 2002 11:40 AM Subject: Displaying Contents on the same line. > Hi all, > > I have to display two phrases on either side of the same line. > like > > "This is at the start This is at the end" > > how can i do that??? > > thanks in advance for te help > > regards > Balajee Chandrasekaran > > > MASTEK > Investing in relationships > In the US, we're called MAJESCO > > ~~ > Opinions expressed in this e-mail are those of the individual and not that of Mastek Limited, unless specifically indicated to that effect. Mastek Limited does not accept any responsibility or liability for it. This e-mail and attachments (if any) transmitted with it are confidential and/or privileged and solely for the use of the intended person or entity to which it is addressed. Any review, re-transmission, dissemination or other use of or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. This e-mail and its attachments have been scanned for the presence of computer viruses. It is the responsibility of the recipient to run the virus check on e-mails and attachments before opening them. If you have received this e-mail in error, kindly delete this e-mail from all computers. > ~~ > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Displaying Contents on the same line.
Hi all, I have to display two phrases on either side of the same line. like "This is at the start This is at the end" how can i do that??? thanks in advance for te help regards Balajee Chandrasekaran MASTEK Investing in relationships In the US, we're called MAJESCO ~~ Opinions expressed in this e-mail are those of the individual and not that of Mastek Limited, unless specifically indicated to that effect. Mastek Limited does not accept any responsibility or liability for it. This e-mail and attachments (if any) transmitted with it are confidential and/or privileged and solely for the use of the intended person or entity to which it is addressed. Any review, re-transmission, dissemination or other use of or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. This e-mail and its attachments have been scanned for the presence of computer viruses. It is the responsibility of the recipient to run the virus check on e-mails and attachments before opening them. If you have received this e-mail in error, kindly delete this e-mail from all computers. ~~ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]