Hi Mike, 

I made two test-cases as you said and I got exact,
SUCCESSful outputs from both of them. 
This is my first use 'preceding-sibling'.

I did like follow,
-------follow start-------------------------------
   <!-- ............................. -->
   <!--        'REPEAT'               -->
   <!-- ............................. -->
   <xsl:template match="SUB/REPEAT" >

        <fo:table-row>

        <fo:table-cell number-columns-spanned='3'>
        <fo:block>

                <!-- and now the table inside the cell -->
                <fo:table>
                <fo:table-column column-width="2cm" />
                <fo:table-column column-width="2cm" />
                <fo:table-column column-width="2cm" />

                <!--*** CASE 2-1 :START *** OK ***
                <xsl:if test='not(preceding-sibling::REPEAT[1])'>
                          <fo:table-header>
                            <fo:table-row height="0.4in" >
                              <fo:table-cell border-color="blue"
border-style="solid" border-width="thin">
                                <fo:block font-weight="bold" font-style=""
font-family="Times" font-size="10pt">
                                  SUB1
                                </fo:block>
                              </fo:table-cell>
                              <fo:table-cell border-color="red"
border-style="solid" border-width="thin">
                                <fo:block font-weight="bold"
font-style="italic" font-family="Times"
font-size="10pt">
                                  SUB2
                                </fo:block>
                              </fo:table-cell>
                              <fo:table-cell border-color="green"
border-style="solid" border-width="thin">
                                <fo:block font-weight="bold"
font-style="italic" font-family="Times"
font-size="10pt">
                                  SUB3
                                </fo:block>
                              </fo:table-cell>
                              </fo:table-row>
                            </fo:table-header>
                </xsl:if>
                *** CASE 2-1 :END ****************-->
                
                <fo:table-body>  <!-- ** %% Not header %% ** -->
                
                <!--*** CASE 2-2 :START *** OK ***-->
                <xsl:if test='not(preceding-sibling::REPEAT[1])'>
                            <fo:table-row height="0.4in" >
                              <fo:table-cell border-color="blue"
border-style="solid" border-width="thin">
                                <fo:block font-weight="bold" font-style=""
font-family="Times" font-size="10pt">
                                  SUB1
                                </fo:block>
                              </fo:table-cell>
                              <fo:table-cell border-color="red"
border-style="solid" border-width="thin">
                                <fo:block font-weight="bold"
font-style="italic" font-family="Times"
font-size="10pt">
                                  SUB2
                                </fo:block>
                              </fo:table-cell>
                              <fo:table-cell border-color="green"
border-style="solid" border-width="thin">
                                <fo:block font-weight="bold"
font-style="italic" font-family="Times"
font-size="10pt">
                                  SUB3
                                </fo:block>
                              </fo:table-cell>
                              </fo:table-row>
                </xsl:if>
                <!--*** CASE 2-2 :END ************-->
                
                
                <fo:table-row  height="0.2in"> 
        
                <fo:table-cell border-color="blue"
border-style="solid" border-width="thin" >
                 <fo:block font-weight="bold"
font-style="italic" font-family="Times"
font-size="13pt">
                   <xsl:value-of select="SUB1" />
                 </fo:block>
                </fo:table-cell>
       
                <fo:table-cell border-color="grey"
border-style="solid" border-width="thin"  >
                 <fo:block font-weight="bold"
font-style="italic" font-family="Times"
font-size="13pt">
                   <xsl:value-of select="SUB2" />
                 </fo:block>
                </fo:table-cell>
        
                <fo:table-cell border-color="green"
border-style="solid" border-width="thin" >
                 <fo:block font-weight="bold"
font-style="italic" font-family="Times"
font-size="13pt">
                   <xsl:value-of select="SUB3" /> 
                 </fo:block>
                </fo:table-cell>
       
       
                </fo:table-row>
                
                </fo:table-body>
                </fo:table>

                <!-- end of included table -->

        </fo:block>
        </fo:table-cell>
        </fo:table-row>

 
   </xsl:template>
-------follow end-------------------------------

Sub table problem was not easy to me.
You helped me a lot.
Thank you for leading me and your great help.
David.
--- Mike Trotman <[EMAIL PROTECTED]> wrote:

> Hi David.
> 
> Various ways of doing this.
> 
> Simplest change to your existing code is probably to
> insert an <xsl:if> 
> block in your current SUB/REPEAT template match
> around the code for the title row.
> 
> To get the title on just the 1st 'ROW2' you would
> need to test that 
> there are no other REPEATs immediately before (i.e.
> this is the 1st)
> so the IF would be something like
> 
> <xsl:if test='not(preceding-sibling::REPEAT[1])'>
> <fo:table-row ...>
> ... and then the <fo:table-cell>s for your titles
> </fo:table-row>
> </xsl:if>
> 
> Also see below for where to insert this.
> 
> 
> Mike
> 
> David Kim wrote:
> 
> >Mike, You are right! I got a good result that I
> wanted
> >exactly. 
> >I put a table in '<xsl:template match="SUB/REPEAT"
> >'
> >as you said, and I got it.
> >I tested it several times and I was able to get
> simple
> >change.
> ><xsl:template match="SUB/REPEAT" > is only one
> thing
> >changed as follow,
> >
> >-------follow start-------------------------------
> >   <!-- ............................. -->
> >   <!--        'REPEAT'               -->
> >   <!-- ............................. -->
> >   <xsl:template match="SUB/REPEAT" >
> >
> >     <fo:table-row>
> >
> >     <fo:table-cell number-columns-spanned='3'>
> >     <fo:block>
> >
> >             <!-- and now the table inside the cell -->
> >             <fo:table>
> >             <fo:table-column column-width="2cm" />
> >             <fo:table-column column-width="2cm" />
> >             <fo:table-column column-width="2cm" />
> >             
> >             <fo:table-body> <!-- ** %% Not header %% ** -->
> >  
> >
> INSERT THE <XSL:IF> HERE
> 
> >                     <fo:table-row  height="0.2in"> 
> >             
> >                     <fo:table-cell border-color="blue"
> >border-style="solid" border-width="thin" >
> >              <fo:block font-weight="bold"
> >font-style="italic" font-family="Times"
> >font-size="13pt">
> >                <xsl:value-of select="SUB1" />
> >              </fo:block>
> >                     </fo:table-cell>
> >       
> >                     <fo:table-cell border-color="grey"
> >border-style="solid" border-width="thin"  >
> >              <fo:block font-weight="bold"
> >font-style="italic" font-family="Times"
> >font-size="13pt">
> >                <xsl:value-of select="SUB2" />
> >              </fo:block>
> >                     </fo:table-cell>
> >             
> >                     <fo:table-cell border-color="green"
> >border-style="solid" border-width="thin" >
> >              <fo:block font-weight="bold"
> >font-style="italic" font-family="Times"
> >font-size="13pt">
> >                <xsl:value-of select="SUB3" /> 
> >              </fo:block>
> >                     </fo:table-cell>
> >       
> >       
> >                     </fo:table-row>
> >             </fo:table-body>
> >             </fo:table>
> >
> >             <!-- end of included table -->
> >
> >     </fo:block>
> >     </fo:table-cell>
> >     </fo:table-row>
> >
> > 
> >   </xsl:template>
> >-------follow end-------------------------------
> >
> >I did one more try. I tried to get sub title as
> follow
> >I think this try is your first suggestion(Using
> >seperate tables).
> >
> >CASE 2
> >
> >
> >Current result is follow (SUCCESS! first test case)
> >|---------|---------|---------|---------| (row1
> title)
> >|------|------|------|                         (row2 title)
> >|---------|---------|---------|---------| (row1)
> >|---------|---------|---------|---------| (row1)
> >|------|------|------|                    (row2)
> >|------|------|------|                    (row2)
> >|---------|---------|---------|---------| (row1)
> >|------|------|------|                    (row2)
> >
> >
> >I want this type table  (ONE MORE added.) 
> >|---------|---------|---------|---------| (row1
> title)
> >|------|------|------|                         (row2 title)
> >|---------|---------|---------|---------| (row1)
> >|---------|---------|---------|---------| (row1)
> >|------|------|------|                         (row2 title)
> >|------|------|------|                    (row2)
> >|------|------|------|                    (row2)
> >|---------|---------|---------|---------| (row1)
> >|------|------|------|                         (row2 title)
> >|------|------|------|                    (row2)
> >
> >or,
> >
> >|---------|---------|---------|---------| (row1
> title)
> >|------|------|------|                         (row2 title)
> >|---------|---------|---------|---------| (row1)
> >|---------|---------|---------|---------| (row1)
> >
> >|------|------|------|                         (row2 title)
> >|------|------|------|                    (row2)
> >|------|------|------|                    (row2)
> >
> >|---------|---------|---------|---------| (row1)
> >
> >|------|------|------|                         (row2 title)
> >|------|------|------|                    (row2)
> >
> >
> >I tried but result is follow (I put the title in
> >sub-table in "SUB/REPEAT" template)
> >|---------|---------|---------|---------| (row1
> title)
> >|------|------|------|                         (row2 title)
> >|---------|---------|---------|---------| (row1)
> >|---------|---------|---------|---------| (row1)
> >|------|------|------|                         (row2 title)
> >|------|------|------|                    (row2)
> >|------|------|------|                         (row2 title)
> >|------|------|------|                    (row2)
> >|---------|---------|---------|---------| (row1)
> >|------|------|------|                         (row2 title)
> >|------|------|------|                    (row2)
> >Please lead me.
> >Thank you for your good help
> >  
> >
> 
> 
> 
> -- 
> No virus found in this outgoing message.
> Checked by AVG Anti-Virus.
> Version: 7.0.322 / Virus Database: 267.3.3 - Release
> Date: 31/05/2005
> 
> 
> Message Scanned by ClamAV on datalucid.com
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Reply via email to