Shawn Bedard wrote: > I have a newbie question concerning the XSL parsing in FOP. I think I have > everything set up correctly because all the test work fine. However, I have > a > series of really simple xsl files that parse with other tools.
First, get your nomenclature straight. An XSL file is an XML document, which is parsed by an XML parser. The XSLT processor stores/compiles this into something which will be used to control a transformation. This transformation is applied to an input tree, generated by an XML parser from an input XML document, and produces a result tree, which could be serialized into a result document. FOP is something different from an XSLT processor (or an XML parser) FOP uses and XML source with som special vocabulary, XSLFO, and produces a rendered version in a Java widget or in some other file format, like PDF. It is common to produce the input for FOP, XSLFO, by an XSL transformation. The FOP command line application allows you either to supply an input FO and some output format, or you can supply an input XML, an XSLT file which describes the transformation from the input XML vocabulary into FOs, and some output format description as in the first case. Xalan is an XSLT processor which is used by default by FOP to execute the transformation in the second case. > [ERROR]: Unknown formatting object ^html This means you are not generating the FO vocabulary FOP expects, but HTML instead. > What am I doing wrong? The input for FOP, XSLFO files, is a quite different beast the HTML. Try the following XSL file, it will generate a very simple XSLFO from your XML file: <?xml version="1.0"?> <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="/"> <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"> <fo:layout-master-set> <fo:simple-page-master master-name="simple" page-height="29.7cm" page-width="21cm"> <fo:region-body/> </fo:simple-page-master> </fo:layout-master-set> <fo:page-sequence master-reference="simple"> <fo:flow flow-name="xsl-region-body"> <fo:block font-size="24pt" text-align="center">Greeting</fo:block> <fo:block>Words of greeting:</fo:block> <fo:block font-weight="bold" font-style="italic" text-decoration="underline"> <xsl:value-of select="greeting"/> </fo:block> </fo:flow> </fo:page-sequence> </fo:root> </xsl:template> </xsl:stylesheet> > Is there some special xslt standard that I don't > know about. Not XSLT, but XSL :-) > Even if someone could provide me with some references and > links concerning xslt sample for FOP that would be great. You have to differentiate between XSLT, which governs transformations, and XSLFO, which describes layout/formatting. You use XSLT to transform your input XML into various other stuff, for example HTML or XSLFO. You have to use different XSLT templates for different output. HTH J.Pietschmann --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]