On Aug 31, 2004, at 8:33 AM, Jeni Tennison wrote:
One solution is to declare the parameter of the function so that it
accepts an empty sequence. Instead of:
<xsl:param name="relatedItem" as="element(mods:relatedItem)" />
which says that $relatedItem must be one-and-only-one
<mods:relatedItem> element, use:
<xsl:param name="relatedItem" as="element(mods:relatedItem)?" />
That solves it.
Here's the example output FYI:
http://www.users.muohio.edu/darcusb/misc/test-author-year.xhtml
You can see where the rule gets applied to the first record. So the
function may well look at the mods:relatedItem details (in this case,
the book), but that is only to know what to do with the main
mods:titleInfo content (the chapter title).
Bruce