Solved

html table  problem in xsl

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

Raise the IQ of Your IT Alerts

From IT major incidents to manufacturing line slowdowns, every business process generates insights that need to reach the people required to take action. You need a platform that integrates with your business tools to create fully enabled DevOps toolchains.

You need xMatters.

Question has a verified solution.

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

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…
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…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…

695 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