[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: "Charles Muller acmuller@xxxxxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 21 Jul 2014 03:24:03 -0000
Re:  Sorting a TEI <biblStruct> bibliography by <surnam
Syd Bauman wrote:

Your code works for me, Charles. (I'm running it as XSLT 2.0 using
Saxon-HE on the commandline.)

HOWEVER, the select= attribute of your <xsl:sort> will try to select *all*
of the <surname> descendants of each child of each <biblStruct>. If
there is more than one, you will get "max 1 item allowed on
xsl:sort/@select" or some such. E.g.

Thanks, Syd. You have identified the problem for me.

Yes, there are some <biblStruct> entries in my data that contain more than one <surname>. If I test this against entries that contain 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"/>


<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!




A. Charles Muller

University of Tokyo
Graduate School of Humanities and Sociology, Faculty of Letters
Center for Evolving Humanities
7-3-1 HongE
, BunkyE
Tokyo 113-8654, Japan

Office: 03-5841-3735


Web Site: Resources for East Asian Language and Thought

H-Buddhism Zotero Bibliography: https://www.zotero.org/groups/h-buddhism_bibliography_project/items/collectionKey

Current Thread


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.
First Name
Last Name
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.