Solved

html table  problem in xsl

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

MIM Survival Guide for Service Desk Managers

Major incidents can send mastered service desk processes into disorder. Systems and tools produce the data needed to resolve these incidents, but your challenge is getting that information to the right people fast. Check out the Survival Guide and begin bringing order to chaos.

Question has a verified solution.

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

Suggested Solutions

The Problem How to write an Xquery that works like a SQL outer join, providing placeholders for absent data on the outer side?  I give a bit more background at the end. The situation expressed as relational data Let’s work through this.  I’ve …
Introduction In my previous article (http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/SSIS/A_9150-Loading-XML-Using-SSIS.html) I showed you how the XML Source component can be used to load XML files into a SQL Server database, us…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

809 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