473,771 Members | 2,392 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

please help in creating a dynamic table

I have a problem in creating a dynamic table
in the same xml :

1.xml:

<?xml version="1.0" standalone="yes "?>
<?xml-stylesheet type="text/xsl" href="2.xsl"?>
<aaa xmlns="http://tempuri.org/My.xsd">
<ppp>
<po>
<co>c</co>
<do>int</do>
<we>1</we>
</po>
</ppp>
<bbb>
<bn>
<yu>20</yu>
<gh>1</gh>
<c1>6</c1>
<c2>6</c2>
<c3>6</c3>
</bn>
</bbb>
<fy>
<pc>
<dk>
<er>1</er>
<c1>2</c1>
<c2>6</c2>
<c3>3</c3>
</dk>
<dk>
<er>1</er>
<c1>5</c1>
<c2>2</c2>
<c3>3</c3>
</dk>
</pc>
<pc>
<dk>
<er>2</er>
<c1>2</c1>
<c2>2</c2>
<c3>8</c3>
</dk>
<dk>
<er>2</er>
<c1>2</c1>
<c2>2</c2>
<c3>0</c3>
</dk>
</pc>
</fy>
</aaa>

and i have this xsl :

2.xsl :
<?xml version="1.0"?>
<xsl:styleshe et version="1.0"
xmlns:xsl="http ://www.w3.org/1999/XSL/Transform"
xmlns:temp="htt p://tempuri.org/My.xsd">
<xsl:output method="html" encoding="Windo ws-1252"/>
<xsl:template match="/">
<html>
<body>

<H2>
<font color="#3399CC" >
<center>Project </center>
</font>
</H2>
<!-- *************** *************** ************* -->
<table Width="100%" BORDER="1" CELLPADDING="5" >
<tr>
<xsl:apply-templates
select="//temp:pc[position()=1]" mode="Default"/>
</tr>
<xsl:apply-templates select="//temp:dk"
mode="notDefaul t"/>
</table>
</body>
</html>
</xsl:template>
<!-- *************** *************** ******* -->

<!-- *************** *************** ************* -->
<xsl:template match="temp:pc[position()=1]" mode="Default">
<xsl:for-each select="temp:dk[position()=1]/*">
<th>
<font color="#3399FF" >
<xsl:value-of select="name()"/>
</font>
</th>
</xsl:for-each>
<br/>
<br/>
</xsl:template>
<!-- *************** *************** **** -->
<xsl:template match="temp:dk[position()=1]" mode="Default">
<xsl:apply-templates/>
</xsl:template>
<!-- *************** ************ -->
<xsl:template match="//temp:pc" mode="notDefaul t">
<!--xsl:for-each select="//temp:pc/*"-->
<xsl:apply-templates select="//temp:dk" mode="notDefaul t"/>
<!--/xsl:for-each-->
</xsl:template>
<!-- *************** *************** *************** ******* -->
<xsl:template match="temp:dk" mode="notDefaul t">
<tr>
<xsl:for-each select="//temp:dk/*">

<td>
<xsl:value-of select="current ()"/>
</td>

</xsl:for-each>
</tr>
</xsl:template>
</xsl:stylesheet>

i want a table that every <dk> node will be in one line.
the first <dk> node in the first line, the second <dk> node will be in
the second line .... an so on

can you pleas tell me way do i get a different results then i seek ?
and can you tell me how can i fix it ?
Jul 20 '05 #1
0 1739

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2053
by: code | last post by:
Hi Grp http://www.books-download.com/?Book=1493-PHP+Hacks+%3a+Tips+%26+Tools+For+Creating+Dynamic+Websites+(Hacks) Description Programmers love its flexibility and speed; designers love its accessibility and convenience. When it comes to creating web sites, the PHP scripting language is truly a red-hot property. In fact, PHP is currently used on more than 19 million web sites, surpassing
3
2223
by: C#_learner | last post by:
Hi!!, I have a table which i wanna print. what i wanted to do is, print the header and footer in every new page i am printing. The table which i am getting data is a dynamic table and with javascript i wanna remove 2 columns before i display it to the viewer . Is there any possible way to accomplish this ? Thanx
2
4801
by: jainharsh | last post by:
Hi Guyz, I am trying to make a dynamic table which will automatically update after running a query. My Table contains 4 columns. I am trying to update the table by adding rows of information to it. But i am able to add only one column, how can i insert 4 columns and make the table resize automatically.
1
1870
by: eureka | last post by:
Hi folks, I am working on a webapplication using Jsp and JS. On my main Jsp(Jsp1) I have a table which is created dynamically inside a <divand contains all the backend-table's records as rows, ie as many records in the MySql-table as many rows in my Html- table(say T1).I am creating this dynamic table using a Jsp-scriptlet and I have set a vertical scrollbar on the <divsuch that user can see 5 rows of T1 at a time.Each row in T1 has a...
0
2523
by: Dhanasekaran B | last post by:
Dear I need to create dynamic temproray table for reporting purpose.I did't have permission for DDL commands. Without Database Administrator permission, i need to create temp. Dynamic table. (or) How to give privilage for create temproray table. Yours Sincerly, Dhanasekaran.B
2
1641
by: miksy99 | last post by:
hi all, i hav created a dynamic table in javascript with no. of rows and col. being entered by the user. i hav given a mouseover event on each cell as red color and mouseout event as yellow color, now my prob starts here. as i click any cell in the table red color appears and wen i go to the next cell previous becomes yellow and current cell becomes red but i want as i go to the third cell(any location), only the previos cell has mouseout...
3
4297
vikas251074
by: vikas251074 | last post by:
I have created dynamic tables whose length depends upon the number of records. Can I use scrollbar in tables? My code for creating dynamic table is as follows - <% dim conn set conn = Server.CreateObject("ADODB.Connection") conn.open = "Provider=MSDAORA.1;dsn=ops;password=op;user id=Outpass;Data Source=Intradb;Persist Security Info=True" set rs = server.CreateObject("ADODB.Recordset") set rs = conn.execute("Select gp_no, per_name, dept...
5
1949
by: vinodsk101 | last post by:
Hi all, I am working on Dynamic table. I am creating the new row each time by using add button. But i in each row i am adding new text boxes, i want to add function to these textboxes like onclick="dosomefuction()" like this. The code look like this: function createNewTextBox(){ var myTable=document.getElementById('myTable');
3
4855
by: tokcy | last post by:
hi everyone, i am creating dynamic row in a table using javascript its working fine and now i want to create more than 1 table using javascript which is dynamic its also working fine but when i am taking the value of each table individually thats i am not able to get any value. if i get the value of table then its not taking properly. let me explain the whole scenario... i want to add product specification . it may vary in number of...
0
9619
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10103
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10038
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7460
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6713
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5482
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4007
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3609
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2850
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.