This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

local variable problem...again!!!


Hello Everyone,
	An XSL sheet is generating a table in which the tr tag takes a
onclick attribute which takes the text of all the td tags concatenated as
one string as parameter... The problem is how do I retrieve that
concatenated string (variable named anchordata) to be passed as a parameter
as I do not have an assignment statement here.....!!! 

<?xml version='1.0'?>
<xsl:stylesheet version="1.0"
      xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; >

<xsl:variable name="total_col" select="count(//PickList/Columns/@*)"/>
<xsl:variable name="total_row" select="count(//PickList/Rows/Row)"/>
<xsl:param name="row_offset" select="10"/>	
<xsl:param name="start_point" select="1"/>

    <xsl:template match="/">

        <html>
            <body>
	            <table width="100%" CELLSPACING="1" CELLPADDING="1"
TABINDEX="-1">
	            		<xsl:call-template name="add_row">
							<xsl:with-param
name="num_row" select="$start_point"/>
						</xsl:call-template>

	            </table>
            </body>
        </html>

    </xsl:template>


    <xsl:template name="add_row">
        <xsl:param name="num_row"/>

        <xsl:if test="$num_row != $start_point + $row_offset and $num_row !=
$total_row + 1">
		<tr>
<xsl:attribute name="onClick">PickListHandler('xsl:value-of
select="$anchordata"')</xsl:attribute>			
			<xsl:call-template name="display_cell">
				<xsl:with-param name="num_row"
select="$num_row"/>
				<xsl:with-param name="num_col" select="1"/>
		    </xsl:call-template>
		    
	    </tr>
		
		    <xsl:call-template name="add_row">
			    <xsl:with-param name="num_row" select="$num_row
+ 1"/>
		    </xsl:call-template>
		
	    </xsl:if>

    </xsl:template>
	
	
    <xsl:template name="display_cell">    
	    <xsl:param name="num_row"/>
        <xsl:param name="num_col"/>
        
	    <xsl:if test="$num_col != $total_col + 1">
			<xsl:variable name="cell_data"
select="//PickList/Rows/Row[position()=$num_row]/@*[name()=concat('C',$num_c
ol)]"/>
            <td><xsl:value-of select="$cell_data"/></td>
			
			<xsl:variable name="anchordata"><xsl:value-of
select="concat('|',$cell_data)"/></xsl:variable>	
			
		    <xsl:call-template name="display_cell">
                <xsl:with-param name="num_row" select="$num_row"/>
			    <xsl:with-param name="num_col" select="$num_col
+ 1"/>			    
		    </xsl:call-template>
		   

	    </xsl:if>
		
		
    </xsl:template>


</xsl:stylesheet>

Regards,
aruniima

----------------------------------------------------------------------------

This message contains privileged and confidential information and is
intended only for the individual named. If you are not the intended
recepient you should not disseminate, distribute, store, print, copy or
deliver this message. Please notify the sender immediately by e-mail if you
have received this e-mail by mistake and immediately delete this e-mail from
your system.


E-mail transmission cannot be guaranteed to be secure or error-free as
information could be intercepted, corrupted, lost, destroyed, arrive late or
incomplete, or contain viruses. The sender therefore does not accept
liability for any errors or omissions in the contents of this message which
arise as a result of e-mail transmission.  If verification is required
please request a hard-copy version.


--------------------------------------------------------------------------

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]