XML Editor
Sign up for a WebBoard account Sign Up Keyword Search Search More Options... Options
Chat Rooms Chat Help Help News News Log in to WebBoard Log in Not Logged in
Show tree view Topic
Topic Page 1 2 3 4 5 6 7 8 9 Go to previous topicPrev TopicGo to next topicNext Topic
Postnext
paul eSubject: newbie needs help. XSLFO can i create two copies of a pdf
Author: paul e
Date: 21 Feb 2007 09:23 PM
Hi, im new to xslt and fo and need some help. Im using stylus studio 6 professional build 287n to design transforms to create FO output for post processing with appache FOP.

Is there a way to create multiple copies from a single source xml file with the second and subsequent copies having slightly different layout (say, a watermark).

All help greatly appreciated.
Thanks
Paul

Posttop
Tony LavinioSubject: newbie needs help. XSLFO can i create two copies of a pdf
Author: Tony Lavinio
Date: 23 Feb 2007 10:57 AM
Assuming you're using an XSLT engine that supports multiple outputs,
such as Saxon or Xalan, you could have a driver that calls the same
templates again and again, but passing a different parameter down
which changes the behavior. Kind of like this:

<xsl:template match="/">
<xsl:apply-templates select="root">
<xsl:with-param name="outputfile" select="'plain.fo'"/>
<xsl:with-param name="watermark" select="''"/>
</xsl:apply-templates>
<xsl:apply-templates select="root">
<xsl:with-param name="outputfile" select="'fancy.fo'"/>
<xsl:with-param name="watermark" select="'big-old-watermark'"/>
</xsl:apply-templates>
......
</xsl:template>

<xsl:template match="root">
<xsl:param name="output-file"/>
<xsl:param name="watermark"/>
<xsl:result-document format="xml" href="{$outputfile}">
......
</xsl:result-document>
</xsl:template>

 
Topic Page 1 2 3 4 5 6 7 8 9 Go to previous topicPrev TopicGo to next topicNext Topic
Download A Free Trial of Stylus Studio 6 XML Professional Edition Today! Powered by Stylus Studio, the world's leading XML IDE for XML, XSLT, XQuery, XML Schema, DTD, XPath, WSDL, XHTML, SQL/XML, and XML Mapping!  
go

Log In Options

Site Map | Privacy Policy | Terms of Use | Trademarks
Stylus Scoop XML Newsletter:
W3C Member
Stylus Studio® and DataDirect XQuery ™are from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2016 All Rights Reserved.