|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Pivot Reports
You will want a set of templates for each table. Each set of templates will match the same elements, but will be distinguished by using the "mode" attribute. This is a very high-level sketch of the solution. You will have to fill in the details yourself. Look into the "mode" attribute. Here are some links. http://www.w3.org/TR/xslt#modes http://www.w3schools.com/xsl/el_apply-templates.asp <xsl:template match="/"> <xsl:apply-templates mode="pivot1" /> <xsl:apply-templates mode="pivot2" /> <xsl:apply-templates mode="pivot3" /> <xsl:apply-templates mode="pivot4" /> </xsl:template> <xsl:template match="notice" mode="pivot1"> </xsl:template> <xsl:template match="notice" mode="pivot2"> </xsl:template> <xsl:template match="notice" mode="pivot3"> </xsl:template> <xsl:template match="notice" mode="pivot4"> </xsl:template> -- Charles Knell cknell@xxxxxxxxxx - email -----Original Message----- From: Vitaliy Paykov <vpay@xxxxxxxxx> Sent: Fri, 05 Jan 2007 12:15:48 +0200 To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Subject: Pivot Reports Hello all! I need xsl template for crosstab building. But not for one table, i need several crosstabs in one xsl template. My XML: <?xml version="1.0" encoding="iso-8859-1"?> <notice> <records> <record> <row> <pivot1> <item> <pivotrow>Closed</pivotrow> <pivotcol>1.0.0.5</pivotcol> <TOTALS>1</TOTALS> </item> <item> <pivotrow>Closed</pivotrow> <pivotcol>4.0.3.5</pivotcol> <TOTALS>22</TOTALS> </item> <item> <pivotrow>Closed</pivotrow> <pivotcol>4.0.3.x</pivotcol> <TOTALS>1</TOTALS> </item> <item> <pivotrow>Closed</pivotrow> <pivotcol>4.0.4.0</pivotcol> <TOTALS>1</TOTALS> </item> <item> <pivotrow>Closed</pivotrow> <pivotcol>4.0.5.0</pivotcol> <TOTALS>7</TOTALS> </item> ........ </pivot1> <pivot2> <item> <pivotrow>Critical</pivotrow> <pivotcol>4.0.3.5</pivotcol> <TOTALS>3</TOTALS> </item> <item> <pivotrow>Non Critical</pivotrow> <pivotcol>1.0.0.5</pivotcol> <TOTALS>3</TOTALS> </item> <item> <pivotrow>Non Critical</pivotrow> <pivotcol>4.0.0.0</pivotcol> <TOTALS>1</TOTALS> </item> ....... </pivot2> </row> <row> <pivot1> <item> <pivotrow>Closed</pivotrow> <pivotcol>1.0.0.5</pivotcol> <TOTALS>1</TOTALS> </item> <item> <pivotrow>Closed</pivotrow> <pivotcol>4.0.3.5</pivotcol> <TOTALS>22</TOTALS> </item> <item> <pivotrow>Closed</pivotrow> <pivotcol>4.0.3.x</pivotcol> <TOTALS>1</TOTALS> </item> <item> <pivotrow>Closed</pivotrow> <pivotcol>4.0.4.0</pivotcol> <TOTALS>1</TOTALS> </item> <item> <pivotrow>Closed</pivotrow> <pivotcol>4.0.5.0</pivotcol> <TOTALS>7</TOTALS> </item> ........ </pivot1> <pivot2> <item> <pivotrow>Critical</pivotrow> <pivotcol>4.0.3.5</pivotcol> <TOTALS>3</TOTALS> </item> <item> <pivotrow>Non Critical</pivotrow> <pivotcol>1.0.0.5</pivotcol> <TOTALS>3</TOTALS> </item> <item> <pivotrow>Non Critical</pivotrow> <pivotcol>4.0.0.0</pivotcol> <TOTALS>1</TOTALS> </item> ....... </pivot2> </row> </record></records></notice> So for each <ROW> i must build 2 pivot reports. How can i do it? */ /* -- */Best regards, Vitaliy Paykov/* e-mail: vpay@xxxxxxxxx ext: 1120 ICQ: 220022522 */ISD QA/*
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








