xsl-list
[Top] [All Lists]

Re: [xsl] Sorting a TEI <biblStruct> bibliography by <surname>

2014-07-20 23:02:10
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!
--~----------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
EasyUnsubscribe: http://lists.mulberrytech.com/unsub/xsl-list/1167547
or by email: xsl-list-unsub(_at_)lists(_dot_)mulberrytech(_dot_)com
--~--

<Prev in Thread] Current Thread [Next in Thread>