I don't remember enough (D)HTML to get the exact code for the expand effect
with DIVs right now. You are on the right path, but your stylesheet needs to
generate a DIV around ComputerX and add an onClick handler to expand or
collapse the DIV. Only Computer elements need that extra code, so you could
check the value of the INF element to generate the correct code.
If you are using ASP.NET, then a much simpler approach would be to just
download a TreeView control, for example from [0] or [1]
--
HTH
Christoph Schittko [MVP, XmlInsider]
Software Architect, .NET Mentor
[0]
http://www.asp.net/ControlGallery/de...=28&tabindex=2
[1]
http://www.asp.net/ControlGallery/Co...=75&tabindex=2
"zurg" <zu*****@wp.pl> wrote in message
news:OC**************@TK2MSFTNGP09.phx.gbl...
Thanks for the link... I'm studing...
but as I said I'm completly green and it will take same time...
If you could look at my code and give me any idea I
would be really greatfull...
That's XML file:
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<?xml-stylesheet type='text/xsl' href='menu.xsl'?>
<Menu>
<COMPUTER>
<NAME>Computer1</NAME>
<LINE>
<INF>Hard Drives</INF>
<ADRESS>..\Data\Computer1_drives.xml</ADRESS>
</LINE>
<LINE>
<INF>Errors Log</INF>
<ADRESS>..\Data\Computer1_Err.xml</ADRESS>
</LINE>
</COMPUTER>
<COMPUTER>
<NAME>Computer2</NAME>
<LINE>
<INF>Hard Drives</INF>
<ADRESS>..\Data\Computer2_drives.xml</ADRESS>
</LINE>
<LINE>
<INF>Errors Log</INF>
<ADRESS>..\Data\Computer2_Err.xml</ADRESS>
</LINE>
</COMPUTER>
</Menu>
and XSL file:
<?xml version='1.0' encoding='UTF-8' ?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:output media-type="text/html" />
<xsl:template match="LINE">
<HTML><body bgcolor="#FEE7B5">
<p><a target="podstawowa" href="{ADRESS}" style="text-decoration:
none"><font face="Verdana"
color="#1B70E2" style="font-size: 9pt"><xsl:value-of
select="INF"/></font></a></p>
</body>
</HTML>
</xsl:template>
</xsl:stylesheet>
And the effect when you open XML look like this:
Computer1
Hard Drives //that's a link
Errors Log //that's a link
Computer2
Hard Drives //that's a link
Errors Log //that's a link
What I need is something that would look like this:
Computer1
Computer2
And when you click on one of the Computers (or a image close to them or
anything...) the Hard Drivers and Error Logs should disapear/apear... like
cliking on the "Computer1":
Computer1
Hard Drives //that's a link
Errors Log //that's a link
Computer2
The main problem is that I've got no idea how many computers will be in
the XML file because it would be generated by a application...
You have any suggestion please let me know...