Short answer: use
(*//surname)[1]
instead of
*//surname[1]
The long answer would be better handled by someone more expert. And
to whatever extent I could give a long answer at all, I couldn't do
it when I'm this tired. :-)
G'night.
> Thanks, Syd. You have identified the problem for me. =20 Yes,
> there are some <biblStruct> entries in my data that contain=20 more
> than one <surname>. If I test this against entries that contain=20=
> only one <surname>, it works. So I need to adjust my code such
> that it applies only to the *first* surname encountered.
>
> Thus, I changed
>
> <xsl:sort select="*//surname"/>
>
> to
>
> <xsl:sort select="*//surname[1]"/>
>
> but this generates the same error message.
>
> I need to find a way to select only the first occurrence of this
> descendant. I am trying to figure this out now, but if anyone can
> point me in the right direction, I'd be delighted!
|