Hi, The XSL-FO snippet that you provides is mixed with some HTML or CSS code, witch produce a non valild XSL-FO. Xalan is not the cause, but something in the process used to get that XSL-FO is wrong.
FYI, FOP 0.95 distribution comes with Xalan 2.7.0. You can use the Xalan version you want, not necessarly the one coming with FOP (the latest released is 2.7.1), don't matter about that. To compare efficiently 0.20.x and 0.9x output, the important thing is to use same Xalan for both (or whatever XSLT engine). Can you attach a clean XSL-FO (without HTML neither CSS)? -- Pascal [email protected] a écrit : > Hi, > > I am using the xalan-2.4.1 version for genrating PDF from foo.fo file. > Please find the foo.fo file ,Also the xml and xsl file[available in > trailing mail] which i am using to generate the foo.fo file is correct or > not ? . > Also the the foo.fo file missing the "<?xml".entry . > > What should be the xalan version for FOP 0.95 ?why the fo file generating > with missing tag ,isthere any issue with xml or xsl file? > Please help for the same. > > foo.fo file > > td { font-family:Courier New;font-size:12; } <fo:root > xmlns:fo="http://www.w3.org/1999/XSL/Format"> > <fo:layout-master-set> > <fo:simple-page-master margin-right="0cm" margin-left="0cm" > margin-bottom="0cm" margin-top="0cm" page-width="1010.8pt" > page-height="624pt" master-name="simpleA4"> > <fo:region-body margin-right="0in" margin-left="0in" margin-bottom="0cm" > margin-top="0cm"/> > <fo:region-after extent="0cm"/> > </fo:simple-page-master> > </fo:layout-master-set> > <fo:page-sequence master-reference="simpleA4"> > <fo:flow flow-name="xsl-region-body"> > <fo:block white-space-collapse="false" font-family="monospace" > font-size="12pt"> > <fo:inline white-space-collapse="false" > font-family="monospace" font-weight="bold" font-size="12pt"> > <fo:inline white-space-collapse="false" font-family="monospace" > font-style="italic" font-size="12pt"> > <fo:inline white-space-collapse="false" font-family="monospace" > text-decoration="underline" font-size="12pt"> ABC Bank Customer Credit > And Debit Records </fo:inline> > </fo:inline> > </fo:inline> > As Of Date :22-Feb-2010 > > > <fo:inline white-space-collapse="false" font-family="monospace" > font-weight="bold" font-size="12pt"> > <fo:inline white-space-collapse="false" font-family="monospace" > text-decoration="underline" font-size="12pt"> > <fo:inline white-space-collapse="false" color="#0033FF" > font-family="monospace" font-size="12pt">Customer Details > </fo:inline> > </fo:inline> > </fo:inline> <fo:inline white-space-collapse="false" > font-family="monospace" font-weight="bold" font-size="12pt"> > <fo:inline white-space-collapse="false" font-family="monospace" > font-style="italic" font-size="12pt"> > <fo:inline white-space-collapse="false" font-family="monospace" > text-decoration="underline" font-size="12pt">ALEN </fo:inline> > </fo:inline> > </fo:inline> > <fo:inline white-space-collapse="false" > font-family="monospace" font-weight="bold" font-size="12pt"> > <fo:inline white-space-collapse="false" font-family="monospace" > font-style="italic" font-size="12pt"> > <fo:inline white-space-collapse="false" font-family="monospace" > text-decoration="underline" font-size="12pt">SALESMAN > </fo:inline> > </fo:inline> > </fo:inline> > <fo:inline white-space-collapse="false" > font-family="monospace" font-weight="bold" font-size="12pt"> > <fo:inline white-space-collapse="false" font-family="monospace" > font-style="italic" font-size="12pt"> > <fo:inline white-space-collapse="false" font-family="monospace" > text-decoration="underline" font-size="12pt">[email protected] > </fo:inline> > </fo:inline> > </fo:inline> > > <fo:inline white-space-collapse="false" font-family="monospace" > font-weight="bold" font-size="12pt"> > <fo:inline white-space-collapse="false" font-family="monospace" > text-decoration="underline" font-size="12pt"> > <fo:inline white-space-collapse="false" color="#FF0000" > font-family="monospace" font-size="12pt">Credit Records > </fo:inline> > </fo:inline> > </fo:inline> > > ---------------------------------------------------------------------------------------- > <fo:inline white-space-collapse="false" font-family="monospace" > font-weight="bold" font-size="12pt"> DATE </fo:inline> > <fo:inline white-space-collapse="false" font-family="monospace" > font-weight="bold" font-size="12pt"> ACCOUNT NO </fo:inline> > <fo:inline white-space-collapse="false" font-family="monospace" > font-weight="bold" font-size="12pt"> AMOUNT </fo:inline> > > ----------------------------------------------------------------------------------------- > 16-Mar-2002 2365 > 1356.00 > 16-Mar-2002 4567 > 201.00 > 16-Mar-2002 3565 > 4543.00 > > ------------------------- > > 6100.00 > > ------------------------- > <fo:inline white-space-collapse="false" font-family="monospace" > font-weight="bold" font-size="12pt"> > <fo:inline white-space-collapse="false" font-family="monospace" > text-decoration="underline" font-size="12pt"> > <fo:inline white-space-collapse="false" color="#FF0000" > font-family="monospace" font-size="12pt">Debit Records </fo:inline> > </fo:inline> > </fo:inline> > > ----------------------------------------------------------------------------------------- > <fo:inline white-space-collapse="false" font-family="monospace" > font-weight="bold" font-size="12pt"> DATE </fo:inline> > <fo:inline white-space-collapse="false" font-family="monospace" > font-weight="bold" font-size="12pt"> ACCOUNT NO </fo:inline> > <fo:inline white-space-collapse="false" font-family="monospace" > font-weight="bold" font-size="12pt"> AMOUNT </fo:inline> > > ----------------------------------------------------------------------------------------- > 16-Mar-2002 2365 > 1356.00 > 16-Mar-2002 4567 > 201.00 > 16-Mar-2002 3565 > 4543.00 > > ------------------------- > > 6100.000 > > ------------------------- > > > > > > > > > > > > > > > > > > > > > > > Copyright Statement > > <fo:inline white-space-collapse="false" > font-family="monospace" font-weight="bold" font-size="12pt"> > <fo:inline white-space-collapse="false" font-family="monospace" > font-style="italic" font-size="12pt"> > <fo:inline white-space-collapse="false" font-family="monospace" > text-decoration="underline" font-size="12pt"> ABC Bank Customer Credit > And Debit Records </fo:inline> > </fo:inline> > </fo:inline> > As Of Date :22-Feb-2010 > > > <fo:inline white-space-collapse="false" font-family="monospace" > font-weight="bold" font-size="12pt"> > <fo:inline white-space-collapse="false" font-family="monospace" > text-decoration="underline" font-size="12pt"> > <fo:inline white-space-collapse="false" color="#0033FF" > font-family="monospace" font-size="12pt">Customer Details > </fo:inline> > </fo:inline> > </fo:inline> <fo:inline white-space-collapse="false" > font-family="monospace" font-weight="bold" font-size="12pt"> > <fo:inline white-space-collapse="false" font-family="monospace" > font-style="italic" font-size="12pt"> > <fo:inline white-space-collapse="false" font-family="monospace" > text-decoration="underline" font-size="12pt">WARD </fo:inline> > </fo:inline> > </fo:inline> > <fo:inline white-space-collapse="false" > font-family="monospace" font-weight="bold" font-size="12pt"> > <fo:inline white-space-collapse="false" font-family="monospace" > font-style="italic" font-size="12pt"> > <fo:inline white-space-collapse="false" font-family="monospace" > text-decoration="underline" font-size="12pt">ANALYST > </fo:inline> > </fo:inline> > </fo:inline> > <fo:inline white-space-collapse="false" > font-family="monospace" font-weight="bold" font-size="12pt"> > <fo:inline white-space-collapse="false" font-family="monospace" > font-style="italic" font-size="12pt"> > <fo:inline white-space-collapse="false" font-family="monospace" > text-decoration="underline" font-size="12pt">[email protected] > </fo:inline> > </fo:inline> > </fo:inline> > > <fo:inline white-space-collapse="false" font-family="monospace" > font-weight="bold" font-size="12pt"> > <fo:inline white-space-collapse="false" font-family="monospace" > text-decoration="underline" font-size="12pt"> > <fo:inline white-space-collapse="false" color="#FF0000" > font-family="monospace" font-size="12pt">Credit Records > </fo:inline> > </fo:inline> > </fo:inline> > > ---------------------------------------------------------------------------------------- > <fo:inline white-space-collapse="false" font-family="monospace" > font-weight="bold" font-size="12pt"> DATE </fo:inline> > <fo:inline white-space-collapse="false" font-family="monospace" > font-weight="bold" font-size="12pt"> ACCOUNT NO </fo:inline> > <fo:inline white-space-collapse="false" font-family="monospace" > font-weight="bold" font-size="12pt"> AMOUNT </fo:inline> > > ----------------------------------------------------------------------------------------- > 11-Jan-2003 1001 > 1000.00 > 11-Jan-2003 1005 > 1800.00 > 11-Jan-2003 1015 > 3800.00 > 11-Jan-2003 1016 > 4000.00 > 11-Jan-2003 2369 > 1360.00 > 11-Jan-2003 2372 > 1363.00 > 11-Jan-2003 4572 > 206.00 > > ------------------------- > > 13529.00 > > ------------------------- > <fo:inline white-space-collapse="false" font-family="monospace" > font-weight="bold" font-size="12pt"> > <fo:inline white-space-collapse="false" font-family="monospace" > text-decoration="underline" font-size="12pt"> > <fo:inline white-space-collapse="false" color="#FF0000" > font-family="monospace" font-size="12pt">Debit Records </fo:inline> > </fo:inline> > </fo:inline> > > ----------------------------------------------------------------------------------------- > <fo:inline white-space-collapse="false" font-family="monospace" > font-weight="bold" font-size="12pt"> DATE </fo:inline> > <fo:inline white-space-collapse="false" font-family="monospace" > font-weight="bold" font-size="12pt"> ACCOUNT NO </fo:inline> > <fo:inline white-space-collapse="false" font-family="monospace" > font-weight="bold" font-size="12pt"> AMOUNT </fo:inline> > > ----------------------------------------------------------------------------------------- > 11-Jan-2003 1001 > 1000.00 > 11-Jan-2003 1005 > 1800.00 > 11-Jan-2003 1015 > 3800.00 > 11-Jan-2003 1016 > 4000.00 > 11-Jan-2003 2369 > 1360.00 > 11-Jan-2003 2372 > 1363.00 > 11-Jan-2003 4572 > 206.00 > > ------------------------- > > 13529.000 > > ------------------------- > > ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ > > IntellectReport.XML > > > <HTML><style type="text/css">td { font-family:Courier New;font-size:12; > }</style> <HEAD><meta http-equiv="Content-Type" content="text/html; > charset= ISO-8859-1"></meta></HEAD><BODY><FORM><PRE><p> > <B><I><U> ABC Bank Customer Credit And Debit > Records </U></I></B> > As Of Date :22-Feb-2010 > > > <B><U><font color = "#0033FF">Customer Details </font></U></B> > <B><I><U>ALEN </U></I></B> > <B><I><U>SALESMAN </U></I></B> > <B><I><U>[email protected] </U></I></B> > > <B><U><font color = "#FF0000">Credit Records </font></U></B> > > ---------------------------------------------------------------------------------------- > <B> DATE </B> <B> ACCOUNT NO </B> > <B> AMOUNT </B> > > ----------------------------------------------------------------------------------------- > 16-Mar-2002 2365 > 1356.00 > 16-Mar-2002 4567 > 201.00 > 16-Mar-2002 3565 > 4543.00 > > ------------------------- > > 6100.00 > > ------------------------- > <B><U><font color = "#FF0000">Debit Records </font></U></B> > > ----------------------------------------------------------------------------------------- > <B> DATE </B> <B> ACCOUNT NO </B> > <B> AMOUNT </B> > > ----------------------------------------------------------------------------------------- > 16-Mar-2002 2365 > 1356.00 > 16-Mar-2002 4567 > 201.00 > 16-Mar-2002 3565 > 4543.00 > > ------------------------- > > 6100.000 > > > > > > > > > > > > Copyright Statement </fo:block> > </fo:flow> > </fo:page-sequence> > </fo:root> top.showClose(); > > > > > philippe voncken > > May be a Xalan version error. > > 2010/2/24 <[email protected]> > HI, > > I have generated the foo.fo file [xsl+xml->fo],When try to generate > the > PDF file with the command <Fop foo.fo jp.pdf >/<Fop -fo foo.fo -pdf > jp.pdf > > getting below error. > Please help to resove the same. > > C:\Documents and Settings\jaiprakash.pande\Desktop\fop-0.95>Fop foo.fo > jp.pdf > [Fatal Error] foo.fo:1:1: Content is not allowed in prolog. > Feb 24, 2010 8:00:46 PM org.apache.fop.cli.Main startFOP > SEVERE: Exception > javax.xml.transform.TransformerException: org.xml.sax.SAXParseException: > Content is not allowed in prolog. at > org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:217) at > org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:125) at > org.apache.fop.cli.Main.startFOP(Main.java:166) at > org.apache.fop.cli.Main.main(Main.java:197) > > --------- > > javax.xml.transform.TransformerException: org.xml.sax.SAXParseException: > Content is not allowed in prolog. at > org.apache.xalan.transformer.TransformerIdentityImpl.transform(Transf > ormerIdentityImpl.java:469) at > org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:214) at > org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:125) at > org.apache.fop.cli.Main.startFOP(Main.java:166) at > org.apache.fop.cli.Main.main(Main.java:197) > Caused by: org.xml.sax.SAXParseException: Content is not allowed in > prolog. at > org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown > Source) at > org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown > Sour > ce) at > org.apache.xalan.transformer.TransformerIdentityImpl.transform(Transf > ormerIdentityImpl.java:452) > > Also ,Please find the foo.fo file fopr the same. Georg > Datterl <gdatt...@geneon. > de> To > "[email protected]" > > Hi jaiprakash, > > It's not necessary for you to generate a pdf, but it's necessary for you > to > get better answers here, since this list deals mainly with fo->pdf, not > xsl+xml->fo. > > Regards, > > Georg Datterl > -----Ursprüngliche Nachricht----- > Von: [email protected] [mailto: > Hi, For the old FOP 0.20 version ,we are able to genrate pdf report this > XML + XSL couple only without ant XSl:FO file and is coming > correctlly. Is it necessary to feed XSL-FO file for FOP 0.95 ? > philippe voncken <m...@philippevon cken.com > > To > > [email protected] > 02/23/2010 09:23 > > > Hi guys, > > to transform easly your xml source, you can also uses xsltop or Xml Copy > Editor, it's are under GNU GPL license. > > regards, > Philippe > > > 2010/2/23 Pascal Sancho <[email protected]> Hi Jaiprakash, As Georg > said, the most useful on this list is to provide XSL-FO file, rather than > XML + XSL couple. You can easily do it by invoking FOP with the -foout > option: Fop -xml foo.xml -xsl foo.xsl -foout foo.fo > > From that point, you can use the same source XSL-FO file to feed > either FOP 0.20.0, or FOP 0.95. Note that FOP distributions comes with > different versions of Xalan, depending on FOP version released; in > certain cases old Xalan versions can cause some troubles, so the same > Xalan for the 2 FOPs is a good start. At this stage, if the 2 ouputs are > differents, you can easily find the lines that have to be tweaked, > directly in you XSL-FO file. Once the result make you happy, you can then > report changes to your XSLT. During this process, we can help you in > resolving issues that could block you, but we *need* XSL-FO. HTH, Pascal > [email protected] a écrit : > Hi, > Please find the xml file > for the same along with the genrated pdf output > .The same below > outputted report is working fine in fop 0.20 version but > after > migration vertical alignment issue is coming. > (See attached file: > IntellectReport.xsl)(See attached file: > IntellectReport.xml) > > PDF > output FOR FOP 0.95 version > (Embedded image moved to file: > pic01200.jpg) > > > EXPECTED OUTPUT:PDF FOR THE VERSION FOP 0.20 > > > (Embedded image moved to file: pic26058.jpg) > > Georg > Datterl > <gdatt...@geneon. > de> > > Hello > jaiprakash, > > Your XSL file doesn't help a lot here. Can you: > * take > your XML file and transform it so you get a fo file > * cut the > irrelevant parts out so it only contains the parts you want > aligned > * > post this shortened fo file > * tell us which parts you want aligned with > which (horizontally? > vertically?) > * and tell us which fop version you > use > > Thanks. > > Georg Datterl > > -----Ursprüngliche Nachricht----- > > Von: [email protected] [mailto: > [email protected]] > > Hi, > > I am unable to generate > properly align data in pdf report.so what changes > should i make in xsl > file for correct alignment od data in pdf? > here is my xsl file .Please > help for the > same. > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
