I am struggling with the best way to parse the following XML section from my document with XSLT using FOP.
<document> <usage> <record> <year>2010</year> <month>1</month> <quantity>1</quantity> </record> <record> <year>2009</year> <month>3</month> <quantity>2</quantity> </record> </usage> </document> In the PDF output, what I actually need to be able to produce is to take the current year (2010) and go backward a total of 4 years. The XML document could contain data in this section that dates back prior to 2006 and that information is just not used in this output. The PDF should look like the following: J F M A M J J A S O N D Total - - - - - - - - - - - - ----- 2010 1 0 0 0 0 0 0 0 0 0 0 0 1 2009 0 0 2 0 0 0 0 0 0 0 0 0 2 The XSLT starts with 2010, searches for data for month 1 and steps by 1 until 12, keeping a total and then displays the yearly total, decrements the year, resets the month to 1 and starts the process over. During each step, I need to examine the XML document to find if data exists for the year/month in /document/usage/record by those two data values and if not, default a 0 usage; otherwise read the value of /quantity from the record. Anyone have any suggestions on the best way to do this? Chris --------------------------------------------------------------------- To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org