xsl-list
[Top] [All Lists]

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

2014-07-20 23:03:21
Graydon wrote:

On Mon, Jul 21, 2014 at 03:24:11AM -0000, Charles Muller 
acmuller(_at_)l(_dot_)u-tokyo(_dot_)ac(_dot_)jp 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 Hongō, Bunkyō-ku
Tokyo 113-8654, Japan

Office: 03-5841-3735

<acmuller(_at_)l(_dot_)u-tokyo(_dot_)ac(_dot_)jp>

Web Site: Resources for East Asian Language and Thought
http://www.acmuller.net

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



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