How to store array in XSL

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • vikramaditya234
    New Member
    • Nov 2007
    • 4

    How to store array in XSL

    Hi,,
    I have a XML:
    <Scan>
    <EScan>
    <Paper>A4</Paper>
    <Sides>Both</Sides>
    <Count>4</Count>
    </EScan>
    <EScan>
    <Paper>A5</Paper>
    <Sides>Both</Sides>
    <Count>2</Count>
    </EScan>
    <EScan>
    <Paper>A3</Paper>
    <Sides>One</Sides>
    <Count>4</Count>
    </EScan>
    </Scan>

    I am using XSL to transform it.
    Now i require to display this value on the web page, which i am already doing by using for-each. But i also require to send <paper>, <sides> and <count> JSP function on the same XSL file. I am unable to figure out how to do it. Do have to form array for sending the data. Please help
  • jkmyoung
    Recognized Expert Top Contributor
    • Mar 2006
    • 2057

    #2
    Could you post your XSL, and expected output?
    I cannot tell what you are asking for.
    What are you referring to when you say 'this value'?

    Comment

    • vikramaditya234
      New Member
      • Nov 2007
      • 4

      #3
      I want to send the value from the 3 tags <paper>, <sides> and <count> to the jsp function.My existing XSL is:
      Code:
      <xsl:for-each select="EScan">
      	<tr align="center" >
      		<xsl:variable name="paperValue" select="Paper" />
      		<xsl:variable name="sidesValue" select="Sides" />
      		<xsl:variable name="countValue" select="Count" />
      				
      		<td align="left"  id="paper_name"  class="greyheadertextbold"><xsl:value-of select="$paperValue" />  </td>
      		<td align="left"  class="greyheadertextbold"><xsl:value-of select="$sidesValue"/></td>
      		<td align="left"   class="greyheadertextbold"><xsl:value-of select="$countValue" /></td>
      		<td align="left" class="greyheadertextbold"><a href="javascript:onDeleteClick1('{$paperValue}','{$sidesValue}','{$countValue}')" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('delete2','','delete2.gif',1)">delete</a></td>
      				
      	</tr>
      </xsl:for-each>

      Comment

      • jkmyoung
        Recognized Expert Top Contributor
        • Mar 2006
        • 2057

        #4
        I don't understand why you have an anchor <a> tag.
        Wouldn't it be more like:
        Code:
         
        <td align="left" class="greyheadertextbold" onClick="onDeleteClick1('{$paperValue}','{$sides  Value}','{$countValue}')" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('delete2','','delete2.gif',1)">delete</td>

        Comment

        Working...