xsl-list
[Top] [All Lists]

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

2014-07-20 22:24:16
Syd Bauman wrote:

Your code works for me, Charles. (I'm running it as XSLT 2.0 using
Saxon-HE 9.5.1.3J 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"/>

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!

Regards,

Chuck

-------------------

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>