> Hi Jeremias,
> 
> Many thanks for your reply. I did some debugging from the command prompt
> on the lines you had suggested. I provided the FO generated by windows to
> FOP at AIX and it worked producing the PDF. So the problem is during
> generation of FO from XML and XSL on AIX. 
> 
> SO I tried generating FO at AIX using both the below 2
> TransformerFactories using teh org.apache.xalan.xslt.Process from
> commandline. All classpaths were rightly set (verified against windows)
> 
> 1.  USING:
> javax.xml.transform.TransformerFactory=org.apache.xalan.processor.Transfor
> merFactoryImpl
> 
> In this case I get following FO, which is not complete, it misses a whole
> set of <fo:block> tags which makes up the contents of the PDF (checked it
> against the Windows generated one)
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format";>
> <fo:layout-master-set>
> <fo:simple-page-master margin-right="0.5cm" margin-left="0.5cm"
> margin-bottom="2cm" margin-top="2cm" page-width="21.59cm"
> page-height="27.94cm" master-name="simpleA4">
> <fo:region-body/>
> </fo:simple-page-master>
> </fo:layout-master-set>
> <fo:page-sequence master-reference="simpleA4">
> <fo:flow flow-name="xsl-region-body">
> <fo:block break-before="column"/>
> </fo:flow>
> </fo:page-sequence>
> </fo:root>
> 
> 
> 2.  USING:
> javax.xml.transform.TransformerFactory=org.apache.xalan.xsltc.trax.Transfo
> rmerFactoryImpl
> 
> Here I encountered two errors:
> 
> a)
> 
> <ntBuilderFactoryImpl org.apache.xalan.xslt.Process -xsl sl.xsl -in ml.xml
> ERROR:  'Cannot convert argument/return type in call to method
> 'java.lang.Math.abs(string)''
> FATAL ERROR:  'Could not compile stylesheet'
> 
> This was generated at 
> 
> <xsl:variable name="absValue" select="java:lang.Math.abs($amt)"/>
> 
> I hardcoded the select values to a number and went ahead where upon I
> encountered error b) below:
> 
> b)
> 
> com.ibm.xslt4j.bcel.generic.ClassGenException: Branch target offset too
> large for short
>         at
> com.ibm.xslt4j.bcel.generic.BranchInstruction.dump(BranchInstruction.java:
> 107)
>         at
> com.ibm.xslt4j.bcel.generic.InstructionList.getByteCode(InstructionList.ja
> va(Compiled Code))
>         at
> com.ibm.xslt4j.bcel.generic.MethodGen.getMethod(MethodGen.java:595)
>         at
> org.apache.xalan.xsltc.compiler.Mode.compileApplyTemplates(Mode.java:1070)
>         at
> org.apache.xalan.xsltc.compiler.Stylesheet.compileModes(Stylesheet.java:61
> 8)
>         at
> org.apache.xalan.xsltc.compiler.Stylesheet.translate(Stylesheet.java:733)
>         at
> org.apache.xalan.xsltc.compiler.Stylesheet.translate(Stylesheet.java:659)
>         at
> org.apache.xalan.xsltc.compiler.SyntaxTreeNode.translateContents(SyntaxTre
> eNode.java:498)
>         at
> org.apache.xalan.xsltc.compiler.LiteralElement.translate(LiteralElement.ja
> va:420)
>         at
> org.apache.xalan.xsltc.compiler.SyntaxTreeNode.translateContents(SyntaxTre
> eNode.java:498)
>         at
> org.apache.xalan.xsltc.compiler.LiteralElement.translate(LiteralElement.ja
> va:420)
>         at
> org.apache.xalan.xsltc.compiler.SyntaxTreeNode.translateContents(SyntaxTre
> eNode.java:498)
>         at
> org.apache.xalan.xsltc.compiler.LiteralElement.translate(LiteralElement.ja
> va:420)
>         at
> org.apache.xalan.xsltc.compiler.SyntaxTreeNode.translateContents(SyntaxTre
> eNode.java:498)
>         at
> org.apache.xalan.xsltc.compiler.LiteralElement.translate(LiteralElement.ja
> va:420)
>         at
> org.apache.xalan.xsltc.compiler.SyntaxTreeNode.translateContents(SyntaxTre
> eNode.java:498)
>         at
> org.apache.xalan.xsltc.compiler.Template.translate(Template.java:343)
>         at
> org.apache.xalan.xsltc.compiler.TopLevelElement.compile(TopLevelElement.ja
> va:64)
>         at
> org.apache.xalan.xsltc.compiler.Mode.compileNamedTemplate(Mode.java:580)
>         at
> org.apache.xalan.xsltc.compiler.Mode.compileTemplates(Mode.java:597)
>         at
> org.apache.xalan.xsltc.compiler.Mode.compileApplyTemplates(Mode.java:849)
>         at
> org.apache.xalan.xsltc.compiler.Stylesheet.compileModes(Stylesheet.java:61
> 8)
>         at
> org.apache.xalan.xsltc.compiler.Stylesheet.translate(Stylesheet.java:733)
>         at org.apache.xalan.xsltc.compiler.XSLTC.compile(XSLTC.java:343)
>         at org.apache.xalan.xsltc.compiler.XSLTC.compile(XSLTC.java:418)
>         at
> org.apache.xalan.xsltc.trax.TransformerFactoryImpl.newTemplates(Transforme
> rFactoryImpl.java:745)
>         at org.apache.xalan.xslt.Process.main(Process.java:721)
> ERROR:  'Branch target offset too large for short'
> FATAL ERROR:  'Could not compile stylesheet'
> 
> (Location of error unknown)XSLT Error
> (javax.xml.transform.TransformerConfigurationException): Could not compile
> stylesheet
> 
> 
> The JDK is IBM JDK Classic VM (build 1.4.2, J2RE 1.4.2 IBM AIX build 
> 
> Can you help in going to the right direction with this. The transformation
> works absolutely fine on Linux and Windows. 
> 
> thanks,
> 
> Samir
> 
>  
> 
>  << File: sl.xsl >>  << File: Windows.fo >>  << File: ml.xml >> 
> -----Original Message-----
> From: Jeremias Maerki [mailto:[EMAIL PROTECTED]
> Sent: Thursday, June 30, 2005 12:19 PM
> To: fop-dev@xmlgraphics.apache.org
> Subject: Re: TraxInputHandler returns blank document - ONLY on AIX OS
> only
> 
> 
> Almost certainly not a FOP bug anyway if it works on other platforms. If
> anything, it's a problem with your stylesheet, not a FOP problem. I've
> seen that your stylesheet contains references to Java classes. Make sure
> they are also properly accessible in the classpath and that you're using
> the same XSLT processor version as on the other platforms. Maybe the
> version on AIX doesn't support the kind of extensions you're using in
> your stylesheet.
> 
> Try running the XSLT process on AIX on the command-line (create just the
> FO file, without FOP) to get more hints about what's wrong.
> 
> On 29.06.2005 12:32:39 Samir Jyoti wrote:
> > This is happening on AIX machine only. During XML/XSL based
> transformation
> > into PDF.
> > 
> > FOP version: 0.20.5
> > OS: IBM Aix 5.3
> > JAVA: version "1.4.2"
> > 
> > during the following code:
> > 
> > TraxInputHandler inputHandler =
> >             new TraxInputHandler(new InputSource (xmlInputStream),
> >                                  new InputSource(xslStream));
> >             //do the XSLT
> >             inputHandler.run(m_driver);
> >             byte[]  recv = pdfBytes.toByteArray();
> >             if(recv!=null){
> >              System.out.println(" BYTES CONVERTED: " + recv.length);
> >             }
> > 
> > The bytes returned are very less (around 800 KB as opposed to around
> 6000K
> > on other OSs). It produces a blank document of one page. Its working
> fine on
> > very other OS.
> > 
> > I am attaching the XML and XSL with this e-mail.
> > 
> > Is this a Bug?
> > 
> > thanks,
> > 
> > Samir
> 
> 
> 
> Jeremias Maerki

<<attachment: winmail.dat>>

Reply via email to