[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

[xsl] Need Help with XSL loop break logic


Subject: [xsl] Need Help with XSL loop break logic
From: Sonu <sonu_thekool@xxxxxxxxx>
Date: Wed, 6 Aug 2003 16:09:00 -0700 (PDT)

Hello XSL gurus,

I am in the process of generating a complex PDF report
using XSLFO and seem to be stuck between a rock and
hard place - my brain is totally fried after 3 days of
trying now.

Consider the case of an invoice with 2 types of
products (say product1 and product2). If the merchant
deals in only one type (either product1 or product2
only), I have to display only one summary page with
his product header + contents and the detail page with
the same product header and all the line items. 

The condition is that if the dealer deals in both the
products and has ordered both the products, I have to
show him 2 summary pages (one for each product with
appropriate product headers) and then the all the line
items for that invoice. The line item page might be
more than 10 pages long and will overflow.

Report Type 1 :
Dealer dealing in 2 products and having an invoice
with both products (meaning he has ordered some
amounts of both products):
	Produt1Header + Product1Summary
	Product2Header + Product2Summary
	Product1Andproduct2Header + Detail line items (can
span multiple pages)

Report Type 2 :
Dealer dealing in 2 products and having an invoice
with either one of 2 products :
	Produt1Header OR Product2Header + Product1Summary OR
Product2Summary
	Product1Header OR Product2Header + Detail line items
of Product1 or Product2(can span multiple pages)
	
Report Type 3 :	
Dealer dealing in 1 product only and having an invoice
with 1 product :
	Produt1Header + Product1Summary
	Product1Header + Detail line items (can span multiple
pages)

Since my report depends on the data that I receive
from the XML, I need a condition in my XSL to break
the loop after printing the first two summary pages
(if there are any) and keep printing the detail line
item pages repeatedly. I have tried everything in XSL
but am not able to set any condition where I can print
certain pages only once and print multiple for all
other pages...

Can anyone please suggest a way out of this problem ??
Please email me if I am not clear in explaining the
problem..

Thanks a lot,
Sonu

__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



Current Thread
Keywords