[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: "Wendell Piez wapiez@xxxxxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 21 Jul 2014 14:54:10 -0000
Re:  Sorting a TEI <biblStruct> bibliography by <surnam

I would do sort/@select="descendant::surname[1]"

Two reasons:

1. More legible and direct

2. Accounts for all surname descendants including biblStruct/surname
(although that shouldn't happen), not just those at lower levels.

Cheers, Wendell

On Mon, Jul 21, 2014 at 12:03 AM, Charles Muller
acmuller@xxxxxxxxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
> Graydon wrote:
>> On Mon, Jul 21, 2014 at 03:24:11AM -0000, Charles Muller
>> acmuller@xxxxxxxxxxxxxxx scripsit:
>>> Thus, I changed
>>>   <xsl:sort select="*//surname"/>
>>> to
>>>   <xsl:sort select="*//surname[1]"/>
>>> but this generates the same error message.
>> What you changed it to isn't necessarily going to change the sequence
>> returned; it would only affect things if the surname elements were
>> siblings.  Otherwise you're getting the surname children of different
>> elements, same as before.  (The implicit context of position() is
>> relative to the parent element, and [1] is short for [position() eq 1])
>> You may want
>> <xsl:sort select="(*//surname)[1]"/>
>> which takes the whole sequence of descendant surname elements and
>> returns the first one, but I'd be worried I had different values of
>> surname in there, and would want to try comparing them to make sure I
>> wasn't perpetrating and atrocity.
> Yes, this seems to do the trick. Thank you very much!
> Charles
> -------------------
> 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
> <acmuller@xxxxxxxxxxxxxxx>
> Web Site: Resources for East Asian Language and Thought
> http://www.acmuller.net
> H-Buddhism Zotero Bibliography:

Wendell Piez | http://www.wendellpiez.com
XML | XSLT | electronic publishing
Eat Your Vegetables

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.