Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

html table  problem in xsl

Posted on 2004-08-26
2
Medium Priority
?
207 Views
Last Modified: 2012-08-14
<table width="820" border="1" cellspacing="1" cellpadding="2">  --------- starting table
           <tr class='formheader'>
            <td align ='center'>Select<br/><input type="checkbox" name="houseCheckAll">
            <xsl:attribute name="onClick">
            checkAll(<xsl:value-of select="count(//ROW)"/>)
            </xsl:attribute>
            </input>
          </td>
            <td width="95" align='center' id="td1">HAWB No</td>
           </tr>
              </table>  ---------------------------------------------------- [[this table]]
<xsl:call-template name="firstone">
      <xsl:with-param name="limit" select="count(//FIRST/ROWSET/ROW)"/>
    </xsl:call-template>

<xsl:call-template name="secondone">
 </xsl:call-template>
</xsl:template>


<xsl:template name="firstone">
<xsl:for-each select ="FIRST/ROWSET/ROW[not(ID = preceding::ROW/ID)]">
<xsl:variable name='ctr' select='position()-1'/>
  <xsl:if test = "$ctr &lt; $limit">
      <tr>
          <td align="center">
      <input type="checkbox" id="houseCheck{(position()-1)}"  name="houseCheck" value='{ID}'>
      <xsl:attribute name="{ST}"/>
      </input>
      </td>
            <td  width="95" >
      <input type="hidden" id="houseDocId{position()}" name="houseDocId" value="{ID}"/>
      </td>
      </tr>
       </xsl:if>
          </table>
    <xsl:call-template name="firstone">
      <xsl:with-param name="ctr" select="($ctr+1)"/>
     <xsl:with-param name="limit" select="$limit"/>
    </xsl:call-template>
      </xsl:for-each>
      
</xsl:template>
</table>  ......................................................................  closing table

in xsl i am getting table row problem

can i close this [[this table]] after firstone xsl:template

or should i close table before staring firstone xsl:template

i want to close the table after firstone xsl:template
0
Comment
Question by:chaitu chaitu
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 19

Expert Comment

by:ramazanyich
ID: 11900564
Move  </table>  ---------------------------------------------------- [[this table]] after
<xsl:call-template name="firstone">
      <xsl:with-param name="limit" select="count(//FIRST/ROWSET/ROW)"/>
    </xsl:call-template>

Resulting XSL:

<xsl:call-template name="firstone">
      <xsl:with-param name="limit" select="count(//FIRST/ROWSET/ROW)"/>
    </xsl:call-template>
</table>
0
 
LVL 35

Accepted Solution

by:
YZlat earned 150 total points
ID: 11902667
<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/TR/WD-xsl">

<table width="820" border="1" cellspacing="1" cellpadding="2">
           <tr class='formheader'>
            <td align ='center'>Select<br/><input type="checkbox" name="houseCheckAll">
          <xsl:attribute name="onClick">
          checkAll(<xsl:value-of select="count(//ROW)"/>)
          </xsl:attribute>
          </input>
         </td>
            <td width="95" align='center' id="td1">HAWB No</td>
           </tr>
 
<xsl:call-template name="firstone">
      <xsl:with-param name="limit" select="count(//FIRST/ROWSET/ROW)"/>
    </xsl:call-template>

<xsl:call-template name="secondone">
 </xsl:call-template>



<xsl:template name="firstone">
<xsl:for-each select ="FIRST/ROWSET/ROW[not(ID = preceding::ROW/ID)]">
<xsl:variable name='ctr' select='position()-1'/>
  <xsl:if test = "$ctr &lt; $limit">
     <tr>
         <td align="center">
     <input type="checkbox" id="houseCheck{(position()-1)}"  name="houseCheck" value='{ID}'>
     <xsl:attribute name="{ST}"/>
     </input>
     </td>
          <td  width="95" >
     <input type="hidden" id="houseDocId{position()}" name="houseDocId" value="{ID}"/>
     </td>
     </tr>
      </xsl:if>
       
    <xsl:call-template name="firstone">
      <xsl:with-param name="ctr" select="($ctr+1)"/>
     <xsl:with-param name="limit" select="$limit"/>
    </xsl:call-template>
     </xsl:for-each>
     
</xsl:template>
 </table>
</xsl:stylesheet>

 
0

Featured Post

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The Client Need Led Us to RSS I recently had an investment company ask me how they might notify their constituents about their newsworthy publications.  Probably you would think "Facebook" or "Twitter" but this is an interesting client.  Their cons…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…

618 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question