473,397 Members | 2,077 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

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
Nov 26 '07 #1
3 1948
jkmyoung
2,057 Expert 2GB
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'?
Nov 26 '07 #2
I want to send the value from the 3 tags <paper>, <sides> and <count> to the jsp function.My existing XSL is:
Expand|Select|Wrap|Line Numbers
  1. <xsl:for-each select="EScan">
  2.     <tr align="center" >
  3.         <xsl:variable name="paperValue" select="Paper" />
  4.         <xsl:variable name="sidesValue" select="Sides" />
  5.         <xsl:variable name="countValue" select="Count" />
  6.  
  7.         <td align="left"  id="paper_name"  class="greyheadertextbold"><xsl:value-of select="$paperValue" />  </td>
  8.         <td align="left"  class="greyheadertextbold"><xsl:value-of select="$sidesValue"/></td>
  9.         <td align="left"   class="greyheadertextbold"><xsl:value-of select="$countValue" /></td>
  10.         <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>
  11.  
  12.     </tr>
  13. </xsl:for-each>
  14.  
Nov 27 '07 #3
jkmyoung
2,057 Expert 2GB
I don't understand why you have an anchor <a> tag.
Wouldn't it be more like:
Expand|Select|Wrap|Line Numbers
  1.  
  2. <td align="left" class="greyheadertextbold" onClick="onDeleteClick1('{$paperValue}','{$sides  Value}','{$countValue}')" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('delete2','','delete2.gif',1)">delete</td>
Nov 27 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

11
by: Colin Steadman | last post by:
Hope this makes sense! I'm building an ASP page which allows uses to add items to an invoice via a form, ie: Item No Part No Order No Quanity Units Price VAT ------- ...
2
by: forums_mp | last post by:
I've got an STL class (see below) with two functions to store and retrieve data - msg structs. The "Store" function when called will copy the received message (depending on which message) into...
3
by: jacob nikom | last post by:
Hi, I would like to be able to store numerical array in MySQL. I am really looking for the solution to store it in the one field only. For example, I have a matrix, which I want to store in...
3
by: Tony Johansson | last post by:
Hello! Assume you want to store field object that a chess board consist of. A chess board consist of 64 fields where each field is either white or black. Now to my question how should I...
4
by: Robert P. | last post by:
I can easily store a one-dimensional array in viewstate ( see Test1 ) If I try storing a multi-dimensional array in the viewstate it's crapping out on me when it goes to serialize the array (not...
2
by: Alan Silver | last post by:
Hello, I am designing a form that allows people to request the formation of a limited company. When they fill in the form, they have to supply a certain amount of information relevant to their...
2
by: hikmaz | last post by:
I am trying to get the rightmost digits (%10) of a number (taken from the user) and store it into successive array locations and get rid of the rightmost digit (\10) to store the next and so on and...
9
by: Ajinkya | last post by:
Hello friends ! , I am very new to java script.If anyone can help me then I will be very very thankful to his/her. I am using php and mysql in my project and I have one textarea and one...
4
by: alnoir | last post by:
I'm writing a script that take web pages and stores the content into an array. Before, I was looping through a text file and stored each line into an array. With a file I could read it by line and...
3
by: almo | last post by:
hi guys, I have question about writing a function that will store some data from a file in an array, then when that function is call in main, I can use that array in the main() for calculation. Here...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.