Hi... given the simple xml snipet...
<workers>
<worker>
<name>Fred</name>
<dob>19410501</dob>
</worker>
<worker>
<name>Fred</name>
<dob>19410501</dob>
</worker>
<worker>
<name>Mary</name>
<dob>99999999</dob>
</worker>
<worker>
<name>Sam</name>
<dob>19361202</dob>
</worker>
</workers>
I need to write some xslt that will produce just the oldest persons name NOT including the default entry of '99999999'. So, Mary refuses to give her DOB.... so my report needs to look at the other workers and provide the oldest persons name. Result should look like this:
<html>
<body>
Sam
</body>
</html>
I can do this if I don't have any default DOB of 99999999. Like this...
<xsl:for-each select="workers/worker">
<xsl:sort select="dob" data-type="number" order="descending" />
<xsl:if test="position() = 1">
<html>
<body>
<xsl:value-of select="name" />
</body>
</html>
</xsl:if>
</xsl:for-each>
That default DOB, however, is just causing me fits.
Any ideas?