Solved

html table  problem in xsl

Posted on 2004-08-26
2
197 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
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 50 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

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…
Browsing the questions asked to the Experts of this forum, you will be amazed to see how many times people are headaching about monster regular expressions (regex) to select that specific part of some HTML or XML file they want to extract. The examp…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

744 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now