xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nels <nbhc...@gmail.com>
Subject Re: XML to PDF on AIX
Date Wed, 17 Oct 2012 04:22:51 GMT
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-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Mime
View raw message