[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Sorting a TEI <biblStruct> bibliography by <surnam

Subject: Re: Sorting a TEI <biblStruct> bibliography by <surname>
From: "s.bauman@xxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 21 Jul 2014 04:02:01 -0000
Re:  Sorting a TEI <biblStruct> bibliography by <surnam
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!

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.