Right, so currently I'm feeding the xml and an example style sheet in to the FOP and it's working as expected. What I'm asking is, what forms can the Style sheet be in? I already have the xsl sheet like this for other purposes:
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:my-class="xalan://edu.iu.uis.eden.edl.WorkflowFunctions" version="1.0"> <xsl:include href="widgets" /> <xsl:output indent="yes" method="html" omit-xml-declaration="yes" version="4.01" /> <xsl:param name="overrideMain" select="'true'" /> <xsl:variable name="docStatus" select="//documentState/workflowDocumentState/status" /> . . . <xsl:template name="mainForm"> <html xmlns=""> <head> <xsl:call-template name="htmlHead" /> <style type="text/css">option { background-color: #ffffff; color: #000000; }</style> </head> <body onload="onPageLoad()"> <xsl:choose> <xsl:when test="($isValidUser = 'true' or $isSuperUser = 'true')"> <xsl:call-template name="header" /> <xsl:call-template name="errors" /> <xsl:call-template name="footer" /> <xsl:variable name="formTarget" select="'EDocLite'" /> <form action="{$formTarget}" enctype="multipart/form-data" id="edoclite" method="post" onsubmit="return validateOnSubmit(this)"> <xsl:call-template name="hidden-params" /> <xsl:call-template name="mainBody" /> <!-- No Notes for initiator --> <xsl:if test="($docStatus != 'INITIATED') and not($isAtNodeInitiated)"> . . . And the style I'm currently using for the FOP is like this: <xsl:stylesheet version="1.1" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" exclude-result-prefixes="fo"> <xsl:output method="xml" version="1.0" omit-xml-declaration="no" indent="yes"/> <xsl:param name="versionParam" select="'1.0'"/> <!-- ========================= --> <!-- root element: documentContent --> <!-- ========================= --> <xsl:template match="documentContent"> <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"> <fo:layout-master-set> <fo:simple-page-master master-name="simpleA4" page-height="29.7cm" page-width="21cm" margin-top="2cm" margin-bottom="2cm" margin-left="2cm" margin-right="2cm"> <fo:region-body/> </fo:simple-page-master> </fo:layout-master-set> <fo:page-sequence master-reference="simpleA4"> <fo:flow flow-name="xsl-region-body"> <fo:block font-size="16pt" font-weight="bold" space-after="5mm">Project: <xsl:value-of select="projectname"/> </fo:block> . . . So, do I need to re-write a stylesheet similar to the second one for each doc I need to convert to PDF Even if I have full stylesheets (like the first shown) already written out. Thanks again. -Greg -----Original Message----- From: Andreas Delmelle [mailto:[email protected]] Sent: Wednesday, December 17, 2008 2:23 PM To: [email protected] Subject: Re: FOP XML->XSLT->FOP PDF Issues On 17 Dec 2008, at 20:01, Patterson, Gregory Michael wrote: Hi <snip /> 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] __________ Information from ESET Smart Security, version of virus signature database 3699 (20081217) __________ The message was checked by ESET Smart Security. http://www.eset.com --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
