Display only names starting with particular letter
I'm using PHP, so I don't think I can use XSLT 2.0 (please, someone correct me if I'm wrong!). What I'm trying to do is this: display each <person> ( along with their associated <year> or any other related information) with a <surname> that starts with the letter A, B, or C. I know how to sort all <person> elements by surname, but is there a way, using XSLT 1.0, to display only those beginning with a certain letter? And if there is more than one person with the same surname, I'd like to be able to sort by forename as well.
Here's a (simplified) sample of my XML:
<faculty>
<person id="1">
<surname>Jones</surname>
<forename>Bill</forename>
<year>1985</year>
</person>
<person id="2">
<surname>Adams</surname>
<forename>Lucy</forename>
<year>2004</year>
</person>
<person id="3">
<surname>Adams</surname>
<forename>Joe</forename>
<year>1997</year>
</person>
<person id="4">
<surname>Smith</surname>
<forename>Edward</forename>
<year>1970</year>
</person>
<person id="5">
<surname>Collins</surname>
<forename>Steve</forename>
<year>2001</year>
</person>
</faculty>
|