Click here to Skip to main content
15,890,897 members
Home / Discussions / XML / XSL
   

XML / XSL

 
QuestionDifferent color within the same node Pin
johncode2313-Mar-09 8:15
johncode2313-Mar-09 8:15 
AnswerRe: Different color within the same node Pin
johncode2313-Mar-09 8:44
johncode2313-Mar-09 8:44 
QuestionCan awebapplication has more than one web.config file Pin
Member 378441213-Mar-09 5:14
Member 378441213-Mar-09 5:14 
QuestionXml Pin
Member 378441213-Mar-09 0:00
Member 378441213-Mar-09 0:00 
AnswerRe: Xml Pin
led mike13-Mar-09 4:49
led mike13-Mar-09 4:49 
Questionhow to create an xml file during run time Pin
pavan ravipati12-Mar-09 18:50
pavan ravipati12-Mar-09 18:50 
QuestionRe: how to create an xml file during run time Pin
led mike13-Mar-09 4:47
led mike13-Mar-09 4:47 
QuestionDisplay dynamic content in a frame controlled by the tree created from XML in another frame [modified] Pin
allenzzzxd11-Mar-09 6:56
allenzzzxd11-Mar-09 6:56 
I have an XML file:

<root>
<foo>
<!--Content Here-->
</foo>
</root>

Now I want generate an HTML file from it. The HTML has two vertical frames. The left one displays the treeview of the XML file. And I want the right one display content of the tree view: when I click on the "foo" node, the content will be displayed on the right.

Now I have written an XSL file to get a treeview:

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">

<xsl:output method="html" />

<xsl:template match="/">
<html>
<head>
<!-- Some JS code to deal with the "expand", "collapse"... sth like these-->
</head>
<body>
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td>
<a onclick="toggle(this)"><img src="plus.gif" /><img src="folder.gif" />root</a>
<div style="display:none;">
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="15"></td>
<td>
<a><img src="page.gif" />Foo</a>
</td>
</tr>
</table>
</div>
</td>
</tr>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>

An HTML file which has:

<html>
<head>
<script language="javascript">
function populateFrames(){
var x = new ActiveXObject("Microsoft.XMLDOM");
var s = new ActiveXObject("Microsoft.XMLDOM");
x.async = false
s.async = false
x.load("source.xml");
s.load("tree.xsl");
var html = x.transformNode(s);
var destination = document.frames("header").document.open("text/html","replace");
destination.write(html);
}
</script>
</head>

<frameset onload="populateFrames()" cols="25%,*">
<frame name="header" scrolling="auto" target="main" />
<frame name="main" />
</frameset>
</html>

As you can see, the tree will display in the "header" frame, and I want the content in the "main" frame.

Could anyone tell me how to do this? It's very urgent: I'm waiting on line. Thanks very much for your help.

modified on Wednesday, March 11, 2009 1:03 PM

<div class="ForumMod">modified on Wednesday, March 11, 2009 1:06 PM</div>
QuestionC# .Net on Threads Pin
Member 39168569-Mar-09 20:21
Member 39168569-Mar-09 20:21 
QuestionWeb based XML import help Pin
krieath6-Mar-09 19:36
krieath6-Mar-09 19:36 
AnswerRe: Web based XML import help Pin
led mike10-Mar-09 6:00
led mike10-Mar-09 6:00 
QuestionOutput to text file Pin
shortdog6-Mar-09 17:28
shortdog6-Mar-09 17:28 
AnswerRe: Output to text file Pin
led mike9-Mar-09 4:53
led mike9-Mar-09 4:53 
GeneralRe: Output to text file Pin
shortdog11-Mar-09 3:01
shortdog11-Mar-09 3:01 
Questionstring manipulation in xsl - concatinating Pin
Sree Raj5-Mar-09 14:25
Sree Raj5-Mar-09 14:25 
AnswerRe: string manipulation in xsl - concatinating Pin
led mike6-Mar-09 4:43
led mike6-Mar-09 4:43 
QuestionProblem reading xml string and convert into a data table Pin
Renukapadhamanaban4-Mar-09 12:38
Renukapadhamanaban4-Mar-09 12:38 
AnswerRe: Problem reading xml string and convert into a data table Pin
led mike5-Mar-09 4:22
led mike5-Mar-09 4:22 
GeneralRe: Problem reading xml string and convert into a data table Pin
Renukapadhamanaban9-Mar-09 15:37
Renukapadhamanaban9-Mar-09 15:37 
QuestionAdding Header an datetime when User prints excel Sheet. Pin
vikram_asv4-Mar-09 9:22
vikram_asv4-Mar-09 9:22 
GeneralRe: Adding Header an datetime when User prints excel Sheet. Pin
Curtis Schlak.4-Mar-09 9:42
Curtis Schlak.4-Mar-09 9:42 
GeneralRe: Adding Header an datetime when User prints excel Sheet. Pin
Ankur19784-Mar-09 13:26
Ankur19784-Mar-09 13:26 
GeneralRe: Adding Header an datetime when User prints excel Sheet. Pin
Curtis Schlak.4-Mar-09 15:08
Curtis Schlak.4-Mar-09 15:08 
GeneralRe: Adding Header an datetime when User prints excel Sheet. Pin
vikram_asv4-Mar-09 17:03
vikram_asv4-Mar-09 17:03 
GeneralRe: Adding Header an datetime when User prints excel Sheet. Pin
vikram_asv4-Mar-09 17:06
vikram_asv4-Mar-09 17:06 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.