This is the mail archive of the docbook-apps@lists.oasis-open.org mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]