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

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:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:temp="http://tempuri.org/My.xsd">
<xsl:output method="html" encoding="Windows-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="notDefault"/>
</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="notDefault">
<!--xsl:for-each select="//temp:pc/*"-->
<xsl:apply-templates select="//temp:dk" mode="notDefault"/>
<!--/xsl:for-each-->
</xsl:template>
<!-- ************************************************** ** -->
<xsl:template match="temp:dk" mode="notDefault">
<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 1718

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

Similar topics

1
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...
3
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...
2
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...
1
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,...
0
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)...
2
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,...
3
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 =...
5
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...
3
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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,...
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...

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.