473,325 Members | 2,792 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,325 software developers and data experts.

XSL Display a Table

Q) How to display all the records of a table using xsl?

Solution applied -->
Suppose a class "test" has an attribute "test1" which itself is a table. "test1"
contains some a1, a2, a3 attributes. I need to display all rows based on the value of an attribute"a1"

Expand|Select|Wrap|Line Numbers
  1. <xsl:template name="rowCounter">
  2.   <xsl:param name="N" />
  3.   <tr>
  4.     <xsl:if test="
  5.       DBE:Attribute[@name='a1']/
  6.       DBE:Object[@Class='test']/
  7.       DBE:Attribute[@name='test1']/
  8.       DBE:Table/
  9.       DBE:TableRow[ $N ]
  10.     "> 
  11.       <xsl:for-each select="
  12.         DBE:Attribute[@name='a1']/
  13.         DBE:Object[@Class='test']/
  14.         DBE:Attribute [@name='test1']/
  15.         DBE:Table
  16.       ">
  17.         <td>          
  18.           <xsl:apply-templates select="DBE:TableRow[ $N ]"/>
  19.         </td>
  20.         <xsl:text> </xsl:text>
  21.       </xsl:for-each>
  22.       <xsl:call-template name="rowCounter">
  23.         <xsl:with-param name="N" select="$N + 1"/>
  24.       </xsl:call-template>
  25.     </xsl:if>
  26.   </tr>
  27. </xsl:template>
Is the above correct? How do I display values of a1, a2 and a3 for each a1?
Sep 14 '09 #1
3 1875
Dormilich
8,658 Expert Mod 8TB
@prao2005
does it work?

@prao2005
by using loops.
Sep 14 '09 #2
Not printing values at present....
Sep 14 '09 #3
Dormilich
8,658 Expert Mod 8TB
I’m fishing in the dark without the relevant XML/XSL.
Sep 14 '09 #4

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

Similar topics

1
by: Jon W | last post by:
This is a small table with hover on the table cells. The first cell is setup to switch from div element to input element by use of display:block/none. In IE, onclick the input element is displayed...
2
by: Stewart | last post by:
Hi Experts. Please put the code sample below into an html document and take a look at in NN6+. One span should be shown while the other is hidden. Clicking the button should reverse this. ...
3
by: shreddie | last post by:
Could anyone assist with the following problem? I'm using JavaScript to hide/show table rows depending on the option selected in radio buttons. The script works fine in IE but in Firefox the...
0
by: Jon W | last post by:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"> <html> <head> <title>rolly</title> <!-- The desired performance for this gem would be to: 1. click on table cells 2. edit in INPUT 3....
18
by: Alpha | last post by:
Hi, I'm working on a Windows applicaton with VS 2003 on windows 2000. I have a listbox that I have binded to a dataset table, "source" which has 3 columns. I would like to display 2 of those...
15
by: Markus Ernst | last post by:
Hi When toggling an element on and off by setting its display property via DOM access, display:none is valid for all kinds of elements, but I can't find anything about a generic value for...
4
by: drew197 | last post by:
I am a newbie. I am editing someone elses code to make it compatible with Firefox and Safari. In IE, when you click on the proper link, a block of text is shown in a nice paragraph form. But, in...
1
by: rbinington | last post by:
Hi, I am trying to write a DNN module that has the ability to insert articles into an article repository. I want the users to be able to move pages around and enter text into the FCKEditor. I...
4
by: rn5a | last post by:
A MS-Access DB has 3 tables - Teacher, Class & TeacherClass. The Teacher table has 2 columns - TeacherID & TeacherName (TeacherID being the primary key). The Class table too has 2 columns - ClassID...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.