NEWBIE: Error when converting from XML to PDF

I’m a complete newbie to XML/XSLT, and I’m using XML Spy’s “” tool in an attempt to convert a simple XML file into a PDF doc. But I’m receiving the following error message:


Output of external XSL converter:

[ERROR] Unsupported element encountered: html (Namespace: default). Source context: unavailable
[ERROR] Expected XSL-FO (root, page-sequence, etc.), SVG (svg, rect, etc.) or elements from another supported language.
[ERROR] java.lang.NullPointerException

Does anyone know what this means? Any & all help is appreciated.

In order to transform XML to PDF you need an XSL stylesheet that uses XSL:FO (formatting objects). So your stylesheet could look like:

<?xml version="1.0" encoding="UTF-8"?>

<xsl:stylesheet version="1.0"
  <xsl:output method="xml" version="1.0" omit-xml-declaration="no" indent="yes"/>
    <xsl:template match="/">
              . . . .

You should be able to find plenty of references and tools to help you with XML:FO. You can also convert html to XSL:FO which can then be tailored, e.g check out .

Hope this helps.

Stuart Fyffe-Collins
Software AG (UK) Ltd.

Great! Thanks for your help. That will really help me to get a foot in the door when it comes to XML-FO. Have a great week.