Hello all
I have this xml :
<?xml version="1.0" standalone="yes"?>
<?xml-stylesheet type="text/xsl" href="xsl.xsl"?>
<aaa xmlns="http://tempuri.org/My.xsd">
<Dog>
<DogName>f1</DogName>
<Shot>16</Shot>
<DogDetail>
<DogName>f1</DogName>
<Vet>google</Vet>
<Degree>danny</Degree>
<Vaxin>false</Vaxin>
<DogText>amstaf kind of wolf</DogText>
<Side>1</Side>
</DogDetail>
<DogDetail>
<DogName>f1</DogName>
<Vet>wofy</Vet>
<Degree>pk</Degree>
<Vaxin>false</Vaxin>
<DogText>colly kind of buldog</DogText>
<Side>2</Side>
</DogDetail>
</Dog>
<Dog>
<DogName>test</DogName>
<Shot>16</Shot>
<DogDetail>
<DogName>test</DogName>
<Vet>google</Vet>
<Degree>danny</Degree>
<Vaxin>true</Vaxin>
<DogText>No Text</DogText>
<Side>1</Side>
</DogDetail>
<DogDetail>
<DogName>test</DogName>
<Vet>wofy</Vet>
<Degree>rexi</Degree>
<Vaxin>true</Vaxin>
<DogText>No Text</DogText>
<Side>2</Side>
</DogDetail>
</Dog>
<Dog>
<DogName>TWA</DogName>
<Shot>16</Shot>
<DogDetail>
<DogName>TWA</DogName>
<Vet>google</Vet>
<Degree>Wolfy</Degree>
<Vaxin>true</Vaxin>
<DogText>No Text</DogText>
<Side>1</Side>
</DogDetail>
<DogDetail>
<DogName>TWA</DogName>
<Vet>wofy</Vet>
<Degree>poki</Degree>
<Vaxin>true</Vaxin>
<DogText>No Text</DogText>
<Side>2</Side>
</DogDetail>
</Dog>
<Dog>
<DogName>QDA</DogName>
<Shot>16</Shot>
<DogDetail>
<DogName>QDA</DogName>
<Vet>yahoo</Vet>
<Degree>asmer</Degree>
<Vaxin>true</Vaxin>
<DogText>No Text</DogText>
<Side>1</Side>
</DogDetail>
<DogDetail>
<DogName>QDA</DogName>
<Vet>wofy</Vet>
<Degree>danny</Degree>
<Vaxin>true</Vaxin>
<DogText>No Text</DogText>
<Side>2</Side>
</DogDetail>
</Dog>
</aaa>
And this xsl :
<xsl:stylesheet version='1.0' xmlns:xsl='http://www.w3.org/1999/XSL/Transform'
xmlns:default="http://tempuri.org/My.xsd">
<xsl:template match="/">
<html>
<head>
<title>Tables</title>
<script language="JavaScript">
<![CDATA[
function toggle(id,closed,opened)
{
var myChild = document.getElementById(id);
var myPIcon = document.getElementById("picon" + id);
var myIcon = document.getElementById("icon" + id);
if(myChild.style.display=="none"){
myChild.style.display="block";
myIcon.src=opened;
myPIcon.src="images/" + "Tminus.png";
}else{
myChild.style.display="none";
myIcon.src=closed;
myPIcon.src="images/" +"Tplus.png";
}
}
]]>
</script>
</head>
<body>
<a name="top"/>
<div class="introc">
<h1>
<font color="blue">
<center>
<u>Dog</u>
</center>
</font>
</h1>
<br/>
<br/>
</div>
<xsl:apply-templates select="//default:Dog"/>
</body>
</html>
</xsl:template>
<!-- ********************************* -->
<xsl:template match="default:Dog">
<xsl:variable name="myId" select="generate-id(.)"/>
<xsl:variable name="icon1">
<xsl:value-of select="'images/folder-closed.gif'"/>
</xsl:variable>
<xsl:variable name="icon2">
<xsl:value-of select="'images/folder-open.gif'"/>
</xsl:variable>
<div onclick="toggle('{$myId}','{$icon1}','{$icon2}')">
<img src="images/Tplus.png" border="0" align="absMiddle" id="picon{$myId}"/>
<img src="{$icon1}" border="0" align="absMiddle" id="icon{$myId}"/>
<u>
<xsl:apply-templates select="default:DogName" mode="Normal"/>
</u>
</div>
<span id="{generate-id(.)}" style="display:none;padding-left:10px;">
<br/>
<br/>
<br/>
<html>
<body>
<H2>
<center>
<xsl:apply-templates select="default:DogName"/>
</center>
</H2>
<TABLE Width="100%" BORDER="1" CELLPADDING="5">
<THEAD>
<TH>A</TH>
<TH>B</TH>
</THEAD>
<TR ALIGN="LEFT">
<TD>
<xsl:apply-templates select="default:DogDetail[default:Side='2']"/>
<br/>
<br/>
</TD>
<TD>
<xsl:apply-templates select="default:DogDetail[default:Side='1']"/>
<br/>
<br/>
</TD>
</TR>
</TABLE>
</body>
</html>
</span>
</xsl:template>
<!-- ****************************************** -->
<xsl:template match="default:DogDetail[Side='2']">
<br/>
<xsl:apply-templates select="default:Vet"/>
<xsl:apply-templates select="default:Degree"/>
<xsl:apply-templates select="default:Vaxin"/>
<xsl:apply-templates select="default:DogText"/>
</xsl:template>
<xsl:template match="default:DogDetail[Side='1']">
<br/>
<xsl:apply-templates select="default:Vet"/>
<xsl:apply-templates select="default:Degree"/>
<xsl:apply-templates select="default:Vaxin"/>
<xsl:apply-templates select="default:DogText"/>
</xsl:template>
<xsl:template match="default:DogName">
<font color="#3399CC">
<SPAN STYLE="font-style:italic">DogName: </SPAN>
<xsl:value-of select="."/>
</font>
<br/>
</xsl:template>
<xsl:template match="default:Vet">
<font color="blue">
<SPAN STYLE="font-style:italic">Vet: </SPAN>
</font>
<xsl:value-of select="."/>
<br/>
</xsl:template>
<xsl:template match="default:Degree">
<font color="blue">
<SPAN STYLE="font-style:italic">Degree: </SPAN>
</font>
<xsl:value-of select="."/>
<br/>
</xsl:template>
<xsl:template match="default:Vaxin">
<font color="blue">
<SPAN STYLE="font-style:italic">Vaxin: </SPAN>
</font>
<xsl:value-of select="."/>
<br/>
</xsl:template>
<xsl:template match="default:DogText">
<font color="blue">
<SPAN STYLE="font-style:italic">DogText: </SPAN>
</font>
<xsl:value-of select="."/>
<br/>
</xsl:template>
<xsl:template match="default:Side">
<font color="blue">
<SPAN STYLE="font-style:italic">Side: </SPAN>
</font>
<xsl:value-of select="."/>
<br/>
</xsl:template>
<xsl:template match="default:Shot">
<font color="#3399FF">
<SPAN STYLE="font-style:italic">Shot: </SPAN>
<xsl:value-of select="."/>
</font>
<br/>
</xsl:template>
</xsl:stylesheet>
I need to open all folders in one click (in a new button), so this one button willl open all the folders (every folder hide in it a table)
now my project look like this
+(folder icon )name 1
+(folder icon )name 2
+(folder icon )name 3
+(folder icon )name 4
(under every "+" the is a table)
And i want to have something like :
+(folder icon ) ALL
+(folder icon )name 1
+(folder icon )name 2
+(folder icon )name 3
+(folder icon )name 4
So , when I will click on all , all the folreds will opened at once
can you help me please?
I wish i culd attach the all the project include the gif's
i need help my friends