I have a small application that looks for links to publications. The quotes are in XML, and I pass the XSLT parameters through PHP to search through fields such as a tool or author. The structure is as follows:
<publications>
<paper>
<authors>
<author>James Smith</author>
<author>Jane Doe</author>
</authors>
<year>2010</year>
<title>Paper 1</title>
(more children)
</paper>
(more papers)
</publications>
When I invoke my template in XSLT, I use a predicate to see which documents are shown based on search criteria. So, if the $ author parameter is given, for example, I:
<xsl:apply-templates select="paper[contains(authors/author, $author)]" />
Problem: this works for the first author in the "authors", but after that is ignored. Therefore, in the above example, a search for βSmithβ will return this article, but βDoeβ returns nothing.
How can I format my expression to take into account all " elements of the author?