you seem to be suffering from two problems:

(1) lack of knowledge/experience with XML/XSLT in general
(2) lack of knowledge/experience with XSL-FO content

this ML is not a very good place to work out problems in category (1), you
really need to read basic/intro books/tutorials on XML/XSLT

once you do generate well formed XSL-FO, further questions would be
appropriate for this ML, since after all FOP is really a process of XSL-FO
documents

the fact that FOP *also* provides a convenience mechanism to input XML/XSLT
is unrelated to XSL-FO functionality in general

what i'm saying, is that you could be using any of a number of other tools
(besides FOP) to perform the XML/XSLT => XSL-FO transformation to produce a
well formed and valid XSL-FO file, and that none of this is related to FOP
in general

the error below shows that your XSLT is failing to generate well formed XML
(that adheres to XSL-FO), so you need to debug your XSLT stylesheet

regards, glenn

On Wed, Oct 17, 2012 at 11:22 AM, nels <nbhc...@gmail.com> wrote:

> Reading this http://www.w3schools.com/xslfo/xslfo_xslt.asp but can't get
> my
> XSL correct. The failure is:
>
> fop -xml schools.xml -xsl schools.xsl -pdf schools.pdf
>
> 18/10/2012 1:16:23 AM org.apache.fop.cli.Main startFOP
> SEVERE: Exception
> Throwable occurred: javax.xml.transform.TransformerException: The markup in
> the document following the root element must be well-formed.
>         at
> org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:303)
>         at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:130)
>         at org.apache.fop.cli.Main.startFOP(Main.java:177)
>         at org.apache.fop.cli.Main.main(Main.java:208)
>
> ---------
>
> ; SystemID: file:/tmp/nelsonc/schools.xml; Line#: 3; Column#: 2
> javax.xml.transform.TransformerException: The markup in the document
> following the root element must be well-formed.
>         at org.apache.xalan.transformer.TransformerImpl.fatalError(Unknown
> Source)
>         at org.apache.xalan.transformer.TransformerImpl.transform(Unknown
> Source)
>         at org.apache.xalan.transformer.TransformerImpl.transform(Unknown
> Source)
>         at org.apache.xalan.transformer.TransformerImpl.transform(Unknown
> Source)
>         at
> org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:300)
>         at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:130)
>         at org.apache.fop.cli.Main.startFOP(Main.java:177)
>         at org.apache.fop.cli.Main.main(Main.java:208)
>
>
> The XML is as per example and the XSL is:
>
> <xsl:stylesheet version="1.0"
>       xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
>       xmlns:fo="http://www.w3.org/1999/XSL/Format";>
>   <xsl:output method="xml" indent="yes"/>
>
> <xsl:template match="header">
>   <fo:block font-size="14pt" font-family="verdana" color="red"
>   space-before="5mm" space-after="5mm">
>     <xsl:apply-templates/>
>   </fo:block>
> </xsl:template>
>
> <xsl:template match="paragraph">
>   <fo:block text-indent="5mm" font-family="verdana" font-size="12pt">
>     <xsl:apply-templates/>
>   </fo:block>
> </xsl:template>
>
> </xsl:stylesheet>
>
>
> I took the example XSL lines and added a header and closing tag line but it
> fails to run. I am probably doing something very dumb. Please help.
>
>
>
> -----
> just starting out with FOP - don't hurt me!
> --
> View this message in context:
> http://apache-fop.1065347.n5.nabble.com/XML-to-PDF-on-AIX-tp37006p37060.html
> Sent from the FOP - Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
>
>

Reply via email to