This is my xml file:
<users>
<user>
<username>mshelly</username>
<password>msh9568745</password>
<person sex="male">
<title>Mr</title>
<lastname>Shelly</lastname>
<firstname>Misho</firstname>
<nationality>Australian</nationality>
<birthdate>1971-11-01</birthdate>
</person>
<email>
mshelly@mymail.com</email>
<mobile>+61356986475631</mobile>
<fax>+6145821255858</fax>
<address>
<home>
<country>Australia</country>
<city>Sydney</city>
<street>GreenMile</street>
<number>17</number>
<postalcode>658</postalcode>
</home>
<work>
<country>Australia</country>
<city>Hobart</city>
<street>West Bird</street>
<number>3</number>
<postalcode>654</postalcode>
</work>
</address>
<preference>None</preference>
</user>....................
And this is my xslt file :
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<html>
<body>
<h2>Personal Information</h2>
<table border="2">
<tr bgcolor="#009995557">
<th>username</th>
<th>lastname</th>
<th>firstname</th>
<th>mail</th>
<th>mobile</th>
<th>fax</th>
</tr>
<xsl:for-each select="users/user/person[starts-with(lastname,'Iva')]/..">
<xsl:sort select="username"/>
<tr>
<td><xsl:value-of select="username"/></td>
<td><xsl:value-of select="person/lastname"/></td>
<td><xsl:value-of select="person/firstname"/></td>
<td><xsl:value-of select="email"/></td>
<td><xsl:value-of select="mobile"/></td>
<td><xsl:value-of select="fax"/></td>
</tr>
</xsl:for-each>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
How can I replace this "<xsl:for-each select="users/user/person[starts-with(lastname,'Iva')]/..">" with some
java code so that when I type from the output some
string it will find the correct user by this string?