Hi all
I got some problems with my xml/xsl.I'm working on asp.net(vb)
These are my xml files. __________________________________________________ ________________
<Addresses>
<Address>
<Name>Anderson</Name>
<House_Name>Melane</House_Name>
<Location>South Venue</Location>
<Place>London</Place>
<Postal_Code>77322</Postal_Code>
<Country>England</Country>
</Address>
<Address>
<Name>Radha</Name>
<House_Name>ThamaraManakkal</House_Name>
<Location>Aleppey</Location>
<Place>Kerala</Place>
<Postal_Code>678221</Postal_Code>
<Country>India</Country>
</Address>
<Address>
<Name>John Smith</Name>
<House_Name>Eden on Earth</House_Name>
<Location>Andhra</Location>
<Place>Mumbai,Maharashtra</Place>
<Postal_Code>823221</Postal_Code>
<Country>India</Country>
</Address>
<Address>
<Name>Siddhanth Marathe</Name>
<House_Name>Gonat</House_Name>
<Location>Juhu</Location>
<Place>Mumbai,Maharashtra</Place>
<Postal_Code>834221</Postal_Code>
<Country>India</Country>
</Address>
<Address>
<Name>Ethen Hunt</Name>
<House_Name>Snow White</House_Name>
<Location>Jenas</Location>
<Place>Miami</Place>
<Postal_Code>23752</Postal_Code>
<Country>America</Country>
</Address>
</Addresses>
--------------------------> Next file
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="Employee.xsl" ?>
<Employee_details>
<Employee id="1">
<Employee_Name>Mr.Anderson</Employee_Name>
<Employee_JobId>250</Employee_JobId>
<Employee_JoiningDate>1/15/2007(January 15 2007)</Employee_JoiningDate>
<Employee_Jobsection>Accounts</Employee_Jobsection>
</Employee>
<Employee id="2">
<Employee_Name>Radha</Employee_Name>
<Employee_JobId>255</Employee_JobId>
<Employee_JoiningDate>1/5/2007(January 5 2007)</Employee_JoiningDate>
<Employee_Jobsection>Accounts</Employee_Jobsection>
</Employee>
<Employee id="3">
<Employee_Name>John smith</Employee_Name>
<Employee_JobId>260</Employee_JobId>
<Employee_JoiningDate>2/5/2007(February 5 2007)</Employee_JoiningDate>
<Employee_Jobsection>Maintainence</Employee_Jobsection>
</Employee>
<Employee id="4">
<Employee_Name>Siddhanth Marathe</Employee_Name>
<Employee_JobId>265</Employee_JobId>
<Employee_JoiningDate>2/8/2007(February 8 2007)</Employee_JoiningDate>
<Employee_Jobsection>Software</Employee_Jobsection>
</Employee>
<Employee id="5">
<Employee_Name>Ethen Hunt</Employee_Name>
<Employee_JobId>270</Employee_JobId>
<Employee_JoiningDate>1/1/2007(January 1 2007)</Employee_JoiningDate>
<Employee_Jobsection>Finance</Employee_Jobsection>
</Employee>
<Employee id="7">
<Employee_Name>Prasanth</Employee_Name>
<Employee_JobId>305</Employee_JobId>
<Employee_JoiningDate>11/9/2006(November 9th 2006)</Employee_JoiningDate>
<Employee_Jobsection>Software</Employee_Jobsection>
</Employee>
</Employee_details>
__________________________________________________ ________________
I have created two imaglinks-->one is
EmployeeTab a
and other one is AddressTab
When i click each image link it should display Employee for EmployeeTablink and EmployeeAddress for Employee Addresstablink in the same xsl page. If i am using xsl:if then for test="expression" what value shud i give and how can i initiate Employee and EmployeeAddress xml on the same page for image click?
__________________________________________________ ________________
My xsl:code is as follows
The xsl : file
__________________________________________________ ________________
<xsl:stylesheet version ="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<html>
<body bgcolor="lavender">
<table border="1" align="center">
<tr>
<td width="700" align="center" colspan="5">
<h2>Employee Details</h2>
<hr/>
</td>
</tr>
<tr >
<td width="25%" align="center">
<h4>Employee Id</h4>
</td>
<td width="25%" align="center">
<h4>Employee Name</h4>
</td>
<td width="25%" align="center">
<h4>Job Id</h4>
</td>
<td width="25%" align="center">
<h4>
<em>
<u>view</u>
</em>
</h4>
</td>
</tr>
</table >
<table >
<tr>
<td>
<a href="UpdateEmployeeXml.aspx"></a>
</td>
</tr>
</table>
<table border="0" width="700" align="center" >
<tr>
<td>
<a href="EmployeeSection.xsl">
<img src="C:\Documents and Settings\trainee\My Documents\My Pictures\EmployeeTab.jpg" border="0"/>
</a>
<a href="">
<img src="C:\Documents and Settings\trainee\My Documents\My Pictures\AddressTab.jpg" border="0"/>
</a>
<a href="">
<img src="C:\Documents and Settings\trainee\My Documents\My Pictures\PersonTypeTab.jpg" border="0"/>
</a>
</td>
</tr>
<tr>
<td>
<input type="button" value="New" onclick="location.href='UpdateEmployeeXml.aspx?id= 0'" />
</td>
</tr>
</table>
<table border="1" align="center" width="700" >
<xsl:for-each select="Employee_details/Employee">
<tr>
<td>
<input type="checkbox" name="{name(@id)}" value="" />
</td>
<td width="25%" align="center">
<xsl:value-of select="@id"/></td>
<td width="25%" align="center">
<xsl:value-of select="Employee_Name"/></td>
<td width="25%" align="center">
<xsl:value-of select="Employee_JobId"/></td>
<td width="25%" align="center">
<b>
<h4><a href="UpdateEmployeeXml.aspx?id={@id}">view</a>
</h4>
</b>
</td>
</tr>
</xsl:for-each>
<tr>
<td>
<h4>
<a href="UpdateEmployeeXml.aspx?id=0">ADD</a>
</h4>
</td>
</tr>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
__________________________________________________ ________________
Please help me if you can it is very urgent.It would be also nice if you could give me tips on how to create good xml pages (ie what type of procedure templates are generally used etc etc.)
Thanks in advance bye Paulson