Re: New User - Fop error.
I have the same problem, and I think it may be a bug. I have used FOP examples from O'Reilly and W3C and I can't get any file, even the most basic to work. Any help would be very much appreciated! Here are two example input files: test.xsl: ?xml version=1.0 encoding=UTF-8? xsl:stylesheet version=1.0 xmlns:xsl=http://www.w3.org/1999/XSL/Transform; xmlns:fo=http://www.w3.org/1999/XSL/Format; xsl:template match=data fo:block xsl:apply-templates select=name/ xsl:apply-templates select=description/ /fo:block /xsl:template xsl:template match=name fo:block font-size=18pt font-family=sans-serif line-height=24pt space-after.optimum=15pt background-color=blue color=white text-align=center padding-top=3pt xsl:value-of select=./ /fo:block /xsl:template xsl:template match=description fo:block font-size=12pt font-family=sans-serif line-height=15pt space-after.optimum=3pt text-align=justify xsl:value-of select=./ /fo:block /xsl:template /xsl:stylesheet test.xml: ?xml version=1.0 encoding=UTF-8? data name Krusty the Clown /name description This memo explains why Krusty the Clown is our best customer. We need to take good care of him from now onwards and make sure that there are always enough bananas for his pet monkey. /description /data - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: New User - Fop error.
Hi, Patrick, FOP can't function without some page-definition information. Try adding the following template to your XSL file (to tell FOP the page layout details): xsl:template match=/ fo:root xmlns:fo=http://www.w3.org/1999/XSL/Format; fo:layout-master-set fo:simple-page-master master-name=only page-height=11in page-width=8.5in margin-top=1in margin-bottom=1in margin-left=1in margin-right=1in fo:region-body region-name=only-body/ /fo:simple-page-master /fo:layout-master-set fo:page-sequence master-reference=only fo:flow flow-name=only-body xsl:apply-templates/ /fo:flow /fo:page-sequence /fo:root /xsl:template HTH Jay Bryant Bryant Communication Services - Original Message - From: Patrick Proctor [EMAIL PROTECTED] To: fop-users@xmlgraphics.apache.org Sent: Monday, January 30, 2006 5:17 PM Subject: Re: New User - Fop error. I have the same problem, and I think it may be a bug. I have used FOP examples from O'Reilly and W3C and I can't get any file, even the most basic to work. Any help would be very much appreciated! Here are two example input files: test.xsl: ?xml version=1.0 encoding=UTF-8? xsl:stylesheet version=1.0 xmlns:xsl=http://www.w3.org/1999/XSL/Transform; xmlns:fo=http://www.w3.org/1999/XSL/Format; xsl:template match=data fo:block xsl:apply-templates select=name/ xsl:apply-templates select=description/ /fo:block /xsl:template xsl:template match=name fo:block font-size=18pt font-family=sans-serif line-height=24pt space-after.optimum=15pt background-color=blue color=white text-align=center padding-top=3pt xsl:value-of select=./ /fo:block /xsl:template xsl:template match=description fo:block font-size=12pt font-family=sans-serif line-height=15pt space-after.optimum=3pt text-align=justify xsl:value-of select=./ /fo:block /xsl:template /xsl:stylesheet test.xml: ?xml version=1.0 encoding=UTF-8? data name Krusty the Clown /name description This memo explains why Krusty the Clown is our best customer. We need to take good care of him from now onwards and make sure that there are always enough bananas for his pet monkey. /description /data - 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: New User - Fop error.
Patrick, Your examples are too basic, missing all of the page structure information. Have a look at the .fo examples in your fop install directory. Cheers, Roland Patrick Proctor wrote: I have the same problem, and I think it may be a bug. I have used FOP examples from O'Reilly and W3C and I can't get any file, even the most basic to work. Any help would be very much appreciated! Here are two example input files: test.xsl: ?xml version=1.0 encoding=UTF-8? xsl:stylesheet version=1.0 xmlns:xsl=http://www.w3.org/1999/XSL/Transform; xmlns:fo=http://www.w3.org/1999/XSL/Format; xsl:template match=data fo:block xsl:apply-templates select=name/ xsl:apply-templates select=description/ /fo:block /xsl:template xsl:template match=name fo:block font-size=18pt font-family=sans-serif line-height=24pt space-after.optimum=15pt background-color=blue color=white text-align=center padding-top=3pt xsl:value-of select=./ /fo:block /xsl:template xsl:template match=description fo:block font-size=12pt font-family=sans-serif line-height=15pt space-after.optimum=3pt text-align=justify xsl:value-of select=./ /fo:block /xsl:template /xsl:stylesheet test.xml: ?xml version=1.0 encoding=UTF-8? data name Krusty the Clown /name description This memo explains why Krusty the Clown is our best customer. We need to take good care of him from now onwards and make sure that there are always enough bananas for his pet monkey. /description /data - 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: New User - Fop error.
Would be helpful if you also write down: What FOP are you using ? (0.20.5 or beta 0.91) Would be helpful if you attached the xsl and xml files or just copy code. IT Department - Coleshill [EMAIL PROTECTED] 26.01.2006 13:15 Please respond to fop-users@xmlgraphics.apache.org To fop-users@xmlgraphics.apache.org cc Subject New User - Fop error. Hi there I hope this is the correct place to post. Ive only just come to looking at XML/FOP in the last few days so please excuse any ignorance. I am running FOP from a DOS shell on windows XP pro. I have just installed the latest JRE. I have put the files I am trying to convert into the same directory as the Fop.bat file, these are afx.xml and afx.xsl. I run fop using : fop -xsl afx.xsl -xml afx.xml -pdf afx.pdf and it returns an error : javax.xml.transform.TransformerException: java.lang.IllegalStateException: endElement() called for html where there is no current element. Exception javax.xml.transform.TransformerException: java.lang.IllegalStateException: endElement() called for html where there is no current element. If anyone has any ideas or is able to point me in the right direction I would be most appreciative. Thankyou. Matt. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: New User - Fop error.
Hi, Matt, Welcome to the FOP world. endElement is a method within the XML parser, so it's apparent that the parser doesn't like either your XML file or your XSL file. Most likely, this is the result of a malformed file (failing to close elements and such). As Jelka indicated, if you can post the XML and XSL files, we can puzzle out exactly what's going wrong. If it's not too much bother, please copy and past the contents of the files right into the message. I am a bit paranoid about opening attachments Jay Bryant Bryant Communication Services - Original Message - From: IT Department - Coleshill [EMAIL PROTECTED] To: fop-users@xmlgraphics.apache.org Sent: Thursday, January 26, 2006 6:15 AM Subject: New User - Fop error. Hi there I hope this is the correct place to post. Ive only just come to looking at XML/FOP in the last few days so please excuse any ignorance. I am running FOP from a DOS shell on windows XP pro. I have just installed the latest JRE. I have put the files I am trying to convert into the same directory as the Fop.bat file, these are afx.xml and afx.xsl. I run fop using : fop -xsl afx.xsl -xml afx.xml -pdf afx.pdf and it returns an error : javax.xml.transform.TransformerException: java.lang.IllegalStateException: endElement() called for html where there is no current element. Exception javax.xml.transform.TransformerException: java.lang.IllegalStateException: endElement() called for html where there is no current element. If anyone has any ideas or is able to point me in the right direction I would be most appreciative. Thankyou. Matt. - 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]