<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
	<channel>
		<title><![CDATA[Latest posts for the topic "Generate one PDF file with different printing requirement from one set of XSL and XML "]]></title>
		<link>http://forums.jcatalog.com/forums/posts/list/2.page</link>
		<description><![CDATA[Latest messages posted in the topic "Generate one PDF file with different printing requirement from one set of XSL and XML "]]></description>
		<generator>JForum - http://www.jforum.net</generator>
			<item>
				<title>Generate one PDF file with different printing requirement from one set of XSL and XML </title>
				<description><![CDATA[ Dear Victor,<br /> <br />          I would like to know can I use one set of XSL and XML to generate one PDF file with different printing requirement via processing by XSLfast?  That means, one PDF file consists of different records.  Each record have different printing requirement.  For example, first record require 4 printer bin trays for printing, second record require 2 printer bin trays for printing.  If yes, I would like to know how I can do it.  <br /> <br />         Would you please reply to me regarding to the above enquiry.  Thank you!   ]]></description>
				<guid isPermaLink="true">http://forums.jcatalog.com/forums/posts/preList/194/9980.page</guid>
				<link>http://forums.jcatalog.com/forums/posts/preList/194/9980.page</link>
				<pubDate><![CDATA[Tue, 8 Jun 2010 01:16:44]]> GMT</pubDate>
				<author><![CDATA[ chaonngy]]></author>
			</item>
			<item>
				<title>Re:Generate one PDF file with different printing requirement from one set of XSL and XML </title>
				<description><![CDATA[ Yes, it is possible. <br /> <br /> First, you need to use either XSD / DTD, or XML file with all examples of your data. If you have only couople of XML files of similar structure, use XSLfast -&gt; Extras -&gt; Concatenate XML files tool, to build one big XML file from couple of small XML files.<br /> <br /> Now, you need to attach your XSD / big XML file to XSLfast, and play with groupings.<br /> <br /> For example, your XML looks like this:<br /> <br /> [code]<br /> &lt;report&gt;<br />     &lt;foo&gt;...&lt;/foo&gt;<br />     &lt;foo&gt;...&lt;/foo&gt;<br />     &lt;foo&gt;...&lt;/foo&gt;<br /> <br />     &lt;bar&gt;...&lt;/bar&gt;<br />     &lt;bar&gt;...&lt;/bar&gt;<br /> <br /> &lt;/report&gt;<br /> [/code]<br /> <br /> Now you have two options:<br /> <br /> 1. Place every sequence (e.g. all `foo` and all `bar`) to separate pages, or <br /> 2. it should be placed in one flow order.<br /> <br /> [b]For first case[/b], you need to define two main page sequences in XSLfast (and add regions for every page separately if needed). And you  need to make proper page groupings for every page sequence, like this:<br /> <br /> [code]/report/foo[count(/report/foo) &gt; 0][/code]<br /> <br /> and<br /> <br /> [code]/report/bar[count(/report/bar) &gt; 0][/code]<br /> <br /> This trick is necessary to omit foo (bar) pages if no any foo (bar) nodes specified in real XML documents.<br /> <br /> Once you defined groupings, you can operate with every specific XML piece as it is alone. For `foo`  page you can freely define everything you need for printing  `foo`. And for `bar`  page you can define anything you need to print `bar` data.<br /> <br /> In this approach you can place tables, static texts, and other content freely in the pages.<br /> <br /> [b]For second way[/b], you need to define only one page sequence with grouping like [code]/report[/code]<br /> <br /> And all other elements should be managed by tables and inner tables content.<br /> <br /> By adding two tables (and table groupings `foo` and `bar` respectively), you can define `foo` elements to be printed prior to `bar` elements (if exists) (or in other order), but all elements not tables either should be printed always, or should be limited to XSL-IF clauses, to define in which case it should be printed. <br /> <br /> In this way, you'll have 5 possible cases: always shown, no foo and bar defined in XML ([i]count(foo) + count(bar) = 0[/i]), defined foo but not bar ([i]count(foo) &gt; 0 and count(bar) = 0[/i]), defined bar and not foo ([i]count(bar) &gt; 0 and count(foo) = 0[/i]), and defined both ([i]count(foo) &gt; 0 and count(bar) &gt; 0[/i]).<br /> <br /> As you see, the second way is much more complex and have a lot of limitations, like you can't define different regions for `foo` and `bar`, as you have only one page sequence.  But it have few real benefits, that might be important for you.<br /> <br /> 1. If both `foo` and `bar` defined, it will be followed without page break between them.<br /> 2. Page columns can be used for arranging `foo` and `bar` as it might be available at one PDF page.<br /> ]]></description>
				<guid isPermaLink="true">http://forums.jcatalog.com/forums/posts/preList/194/9983.page</guid>
				<link>http://forums.jcatalog.com/forums/posts/preList/194/9983.page</link>
				<pubDate><![CDATA[Tue, 8 Jun 2010 12:44:53]]> GMT</pubDate>
				<author><![CDATA[ Victor Krapivin]]></author>
			</item>
			<item>
				<title>Re:Generate one PDF file with different printing requirement from one set of XSL and XML </title>
				<description><![CDATA[ Thanks Victor.<br /> <br /> I have another question regarding to XSLfast.  I would like to know can I use one set of XML and XSL file to generate several PDF files with different records at the same time?  <br /> <br /> If yes,  how can I do it?<br /> <br /> ]]></description>
				<guid isPermaLink="true">http://forums.jcatalog.com/forums/posts/preList/194/9984.page</guid>
				<link>http://forums.jcatalog.com/forums/posts/preList/194/9984.page</link>
				<pubDate><![CDATA[Wed, 9 Jun 2010 01:51:11]]> GMT</pubDate>
				<author><![CDATA[ chaonngy]]></author>
			</item>
			<item>
				<title>Re:Generate one PDF file with different printing requirement from one set of XSL and XML </title>
				<description><![CDATA[ The XSLfast is an designer tool: it produces one XSL file, and you can use many different XML files with this XSL to produce many PDF files.<br /> <br /> The typical use case is:<br /> <br /> 1. Generate XSL file inside XSLfast (just make layout, test it, and use File-&gt;Export command to get XSL file).<br /> <br /> Now, once you have XSL file, yoy can print may PDF files. How?<br /> <br /> First, you  need the following tools:<br /> <br /> - Saxon<br /> - FOP (or XEP or AHFormatter).<br /> <br /> Every actual XML file with data needs to be processed in two steps:<br /> <br /> a) Via Saxon, generate XSL-FO: [code]saxon -o my.xsl.fo my.xml my.xsl[/code] where my.xsl.fo - file newly produced, my.xml - current XML file with data to be printed, my.xsl is XSL file from XSLfast (see step 1).<br /> b) Render XSL-FO file from a) to PDF: [code]fop -c fop.xconf -pdf my.pdf my.xsl.fo[/code]where my.pdf is newly created PDF file, and my.xsl.fo is file generated by step (a).<br /> <br /> Note: fop.xconf should be contributed from XSLfast/lib/FOP_1.0 folder, to be sure you've using the same settings for FOP as for XSLfast. Also, we recommen to start FOP from XSLfast/bin folder, to be sure all relative paths to resources are the same as for XSLfast.<br /> ]]></description>
				<guid isPermaLink="true">http://forums.jcatalog.com/forums/posts/preList/194/9985.page</guid>
				<link>http://forums.jcatalog.com/forums/posts/preList/194/9985.page</link>
				<pubDate><![CDATA[Wed, 9 Jun 2010 13:44:00]]> GMT</pubDate>
				<author><![CDATA[ Victor Krapivin]]></author>
			</item>
	</channel>
</rss>
