OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [docbook-apps] XSL sort expression for bibliography


William Sporrong wrote:

> Hello, I'm trying to sort my bibliography according to author
> surname. First of all I don't know where to put the sort
> code(<xsl:sort>)? I first tried putting it inside the
> match="bibliography" (biblio.xsl) template inside
> <xsl:apply-template/>. This sorts the entries but not the numbers?!?

That's because XSLT always operates on source tree not on sorted nodes. 
Getting correct numbers would mean overwriting existing code to use 
position() function to get bibliography number.

> Second question is about XSL if someone could help me phrase a proper
> XPath query to use in with the <xsl:sort>. This is how I want to
> sort: ./author/surname or (if it does not exist) 
> ./authorgroup/author/surname or (if it does not exist) 
> ./biblioset[@relation='journal']/author/surname or (if it does not
> exist) ./biblioset[@relation='journal']/authorgroup/author/surname or
> (if it does not exist) ./title
> 
> To make it even more complicated the author names are not sorted in
> the bibliography so I also need a way to find the alphabetical first
> surname in every case.

I think that your requirements are so complex that you would do better 
using some citations management tool which is able to sort and export 
bibliography entries into DocBook. I think that refdb from Markus 
Hoenicka can do that and there are probably also other systems.

-- 
------------------------------------------------------------------
   Jirka Kosek     e-mail: jirka@kosek.cz     http://www.kosek.cz
------------------------------------------------------------------
   Profesionální školení a poradenství v oblasti technologií XML.
         DocBook 18.-19.5.                 XSLT 24.-26.5.
         XML pro vývojáře 7.-8.6.          XSL-FO 16.6.
------------------------------------------------------------------

S/MIME Cryptographic Signature



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]