On 17 Dec 2008, at 20:01, Patterson, Gregory Michael wrote:
Hi
<snip />
I do have a question (it’s simple I think): Looking at the example
xsl sheets, they utilize the xsl:fo funcationality and tags heavily,
but I thought that I was told (or read) somewhere that a regular
xslt stylsheet could be used as well. Is that the case, or will I
need write specially formatted xsl:fo styles for each form I need to
generate a pdf from? Thanks
Well, FOP is short for FO-Processor, so only deals with FO as input
(an XML document in the XSL-FO namespace, adhering rules set out in
the XSL-FO Recommendation). The XSLT specification grew out of XSL-FO,
since there are many other use-cases for stylesheet transformations
that have nothing to do with FO.
Most of these cases are XML-to-XML/HTML, so transforming the structure
of a given source XML to yield a different one, or meant for a
different output target. The most notable one is HTML or XHTML, but
plain text is also a possibility. You could write a second stylesheet
that transforms your XML into XHTML for alternate display in a web
browser, if you'd like...
FOP offers the option to supply XML+XSLT as input, but this is more
for users' convenience as the transformation from source XML to FO is
taken care of by an XSLT processor (whichever one is available on the
classpath).
To answer your question (if I get it correctly):
If you need PDF based on XML data, and you want to produce it using
FOP, you'll indeed need to get familiar with both XSL-FO and XSLT. The
benefit here is that you can use the same stylesheet for multiple
output formats (PDF/PostSript/AFP/Java2D/RTF).
Cheers
Andreas
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]