xsl-list
[Top] [All Lists]

Re: [xsl] Pivot Reports

2007-01-05 10:36:34
I meant specifically for the test data you provided previously, what
is the desired output for that test data?  If I copy and paste the
html result, this is what I see right now:

* Closed Closed Closed Closed Closed total
1.0.0.5 1 1
4.0.3.5 22 22
4.0.3.x 1 1
4.0.4.0 1 1
4.0.5.0 7 7
total 32 32
* Critical Non Critical Non Critical total
4.0.0.0 - 1 1
total 3 4 7

* Closed Closed Closed Closed Closed total
total 32
* Critical Non Critical Non Critical total
total 7




Dan Ochs, Principal Consultant
Wrycan, Inc
http://www.wrycan.com
dan(dot)ochs(at)wrycan(dot)com



On 1/5/07, Vitaliy Paykov <vpay(_at_)isd(_dot_)dp(_dot_)ua> wrote:
I want build picture like this:


*       Software        SW Change       total
B-Evaluated     4       1       5
C-Open  1       -       1
E-Reviewed      1       -       1
total   6       1       7




*       Deficiency      Enhancement     Environment     External - SCC  Not a 
Defect
Software        SW Change       Test Case       total
B-Evaluated     90      48      -       7       3       1       18      33      
200
E-Reviewed      1       -       -       -       -       -       -       -       
1
J-Rework        4       -       5       -       -       -       -       -       
9
total   7       3       1       33      18      95      48      5       210





*       Deficiency      Enhancement     External - SCC  Not a Defect    
Software        SW
Change  Test Case       total
A-New   1       -       -       -       -       -       -       1
B-Evaluated     15      3       1       2       1       3       3       28
E-Reviewed      1       -       -       1       -       -       -       2
total   3       1       3       3       17      3       1       31



*
        Deficiency      Enhancement     Environment     External - 3rd party    
External
- SCC   Installation    Not a Defect    Software        SW Change       Test 
Case       total
A-New   2       -       2       -       -       -       -       -       -       
-       -       4
B-Evaluated     -       175     66      1       44      29      1       1       
19      16      2       354
C-Open  -       3       1       -       1       -       -       -       -       
-       -       5
D-Implemented   -       -       1       -       -       -       -       -       
-       -       -       1
E-Reviewed      -       39      3       -       5       5       -       -       
-       -       -       52
F-Loaded        -       -       1       -       -       -       -       -       
-       -       -       1
G-Fixed         -       -       8       -       -       -       -       -       
-       -       -       8
H-Tested        -       16      1       -       1       1       -       -       
-       -       -       19
J-Rework        -       -       4       -       -       -       -       -       
-       -       -       4
total   2       51      35      1       2       16      1       19      233     
87      1       448






D O wrote:
> Do you have a sample html of the output you want, given the test data?
> This way we can see what exactly you are trying to do...
>
> thanks, dan
>
>
> Dan Ochs, Principal Consultant
> Wrycan, Inc
> http://www.wrycan.com
> dan(dot)ochs(at)wrycan(dot)com
>
> On 1/5/07, Vitaliy Paykov <vpay(_at_)isd(_dot_)dp(_dot_)ua> wrote:
>> This is my XSL template:
>>
>> <xsl:stylesheet version="1.0"
>> xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
>> <xsl:key name="b" match="pivotrow" use="."/>
>> <xsl:key name="c" match="pivotcol" use="."/>
>> <xsl:template match="/">
>> <xsl:for-each select="/notice/records/record/row">
>>   <br/>
>> <xsl:for-each select="pivot1">
>>       <table border="1" cellspacing="0" class="stn">
>>           <tr>
>>             <th>*</th>
>>             <xsl:for-each select="item/pivotrow">
>>               <xsl:sort select="."/>
>>               <xsl:variable name="vpivotrow" select="."/>
>>               <th>
>>                 <xsl:value-of select="."/>
>>               </th>
>>             </xsl:for-each>
>>             <th>total</th>
>>           </tr>
>>         <xsl:for-each
>> select="item/pivotcol[generate-id(.)=generate-id(key('c',.)[1])]">
>>           <xsl:sort select="."/>
>>           <xsl:variable name="vpivotcol" select="."/>
>>           <tr>
>>             <th><xsl:value-of select="."/></th>
>>             <xsl:for-each
>> select="../../item/pivotrow[generate-id(.)=generate-id(key('b',.)[1])]">
>>               <xsl:variable name="vpivotrow" select="."/>
>>               <td>
>>                 <xsl:if test="not(../../item[pivotcol=$vpivotcol and
>> pivotrow=$vpivotrow])">-</xsl:if>
>>                 <xsl:if test="../../item[pivotcol=$vpivotcol and
>> pivotrow=$vpivotrow]"><xsl:value-of
>> select="../../item[pivotcol=$vpivotcol and
>> pivotrow=$vpivotrow]/TOTALS"/></xsl:if>
>>               </td>
>>             </xsl:for-each>
>>             <td><xsl:value-of
>> select="sum(../../item[pivotcol=$vpivotcol]/TOTALS)"/></td>
>>           </tr>
>>         </xsl:for-each>
>>           <tr>
>>             <th>total</th>
>>             <xsl:for-each
>> select="item/pivotrow[generate-id(.)=generate-id(key('b',.)[1])]">
>>               <xsl:sort select="."/>
>>               <xsl:variable name="vpivotrow" select="."/>
>>               <td>
>>                 <xsl:value-of
>> select="sum(../../item[pivotrow=$vpivotrow]/TOTALS)"/>
>>               </td>
>>             </xsl:for-each>
>>             <td><xsl:value-of select="sum(item/TOTALS)"/></td>
>>           </tr>
>>       </table>
>> </xsl:for-each>
>>
>> <xsl:for-each select="pivot2">
>>       <table border="1" cellspacing="0" class="stn">
>>           <tr>
>>             <th>*</th>
>>             <xsl:for-each select="item/pivotrow">
>>               <xsl:sort select="."/>
>>               <xsl:variable name="vpivotrow" select="."/>
>>               <th>
>>                 <xsl:value-of select="."/>
>>               </th>
>>             </xsl:for-each>
>>             <th>total</th>
>>           </tr>
>>         <xsl:for-each
>> select="item/pivotcol[generate-id(.)=generate-id(key('c',.)[1])]">
>>           <xsl:sort select="."/>
>>           <xsl:variable name="vpivotcol" select="."/>
>>           <tr>
>>             <th><xsl:value-of select="."/></th>
>>             <xsl:for-each
>> select="../../item/pivotrow[generate-id(.)=generate-id(key('b',.)[1])]">
>>               <xsl:variable name="vpivotrow" select="."/>
>>               <td>
>>                 <xsl:if test="not(../../item[pivotcol=$vpivotcol and
>> pivotrow=$vpivotrow])">-</xsl:if>
>>                 <xsl:if test="../../item[pivotcol=$vpivotcol and
>> pivotrow=$vpivotrow]"><xsl:value-of
>> select="../../item[pivotcol=$vpivotcol and
>> pivotrow=$vpivotrow]/TOTALS"/></xsl:if>
>>               </td>
>>             </xsl:for-each>
>>             <td><xsl:value-of
>> select="sum(../../item[pivotcol=$vpivotcol]/TOTALS)"/></td>
>>           </tr>
>>         </xsl:for-each>
>>           <tr>
>>             <th>total</th>
>>             <xsl:for-each
>> select="item/pivotrow[generate-id(.)=generate-id(key('b',.)[1])]">
>>               <xsl:sort select="."/>
>>               <xsl:variable name="vpivotrow" select="."/>
>>               <td>
>>                 <xsl:value-of
>> select="sum(../../item[pivotrow=$vpivotrow]/TOTALS)"/>
>>               </td>
>>             </xsl:for-each>
>>             <td><xsl:value-of select="sum(item/TOTALS)"/></td>
>>           </tr>
>>       </table>
>> </xsl:for-each>
>> </xsl:for-each>
>> </xsl:template>
>> </xsl:stylesheet>
>>
>> In result i have right view of first table, in second table i have only
>> columns and rows which not exists in first table etc.
>>
>> Seems I have version 1.0
>>
>> Abel Braaksma wrote:
>> > Vitaliy Paykov wrote:
>> >> I need xsl template for crosstab building.
>> >>
>> >> But not for one table, i need several crosstabs in one xsl template.
>> >>
>> >> My XML:
>> >
>> > Where is your XSLT that you've got so far and where did you get stuck?
>> > What is the XSLT version you use?
>> >
>> > -- Abel
>> >
>> > --~------------------------------------------------------------------
>> > XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
>> > To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
>> > or e-mail: 
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
>> > --~--
>> >
>> >
>>
>>
>> --
>> */Best regards,
>> Vitaliy Paykov/*
>> e-mail: vpay(_at_)isd(_dot_)dp(_dot_)ua
>> ext: 1120
>> ICQ: 220022522
>> */ISD QA/*
>>
>> --~------------------------------------------------------------------
>> XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
>> To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
>> or e-mail: 
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
>> --~--
>>
>>
>
> --~------------------------------------------------------------------
> XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
> To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
> or e-mail: 
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
> --~--
>
>


--
*/Best regards,
Vitaliy Paykov/*
e-mail: vpay(_at_)isd(_dot_)dp(_dot_)ua
ext: 1120
ICQ: 220022522
*/ISD QA/*

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>