FXSL

OK, for post 0.6:

In fact, this is the most difficult part of the code. The
bib:enhanced-biblist variable’s job is to pre-process the metadata
record, taking the unique values of the db:bbilioref/@linkend values.

By class, logic is:

author-year: group by author, then year, and sort in ascending order
for each group

citekey: sort by the value of the @linkend

number: two options (I think!):
- sort and number by (first, if more than one) occurrence in text
- number as above, but sort in biblist by author-year

note-based (footnote, etc.)
- if there’s a biblist, as author-year; but the tricky part is …
- for every citation, you need to know if:
* it’s the first occurrence in the text, or subsequent
* if there is one immediately preceding it

Let me quote the Chicago Manual of Style on this, just so it’s clear:

“The abbreviation ibid. (from ibidem, “in the same place”) refers to a
single work cited in the note immediately preceding … It must never
be used if the preceding note contains more than one citation. It takes
the place of … as much of the succeeding material as is identical.”

Examples:

  1. Farmwinkle, Humor of the Midwest, 241.
  2. Ibid., 258-59
  3. Ibid.
  4. Ibid., 333-34

A PITA, eh? So if you had DocBook source for the above, you’d have:




More:

“Ibid. may also be used within one note in successive references to the
same work.”

Chicago also notes Idem and Op.cite and loc.cite, which it recommends
against.

Anyway, I suppose one way to test use of FXSL is to write a function
that correctly (and very quickly) does the above?

My strategy in the existing code was to then add information gleaned in
the above process to the records in the temporary tree, so that there’s
no double hit on performance.

Bruce

I could write one nested FXSL statement on one line of code and in
less than 100 milliseconds have EVERY citation contained in a
documnent returned to me in a sorted sequence, the sort key determine
by passing how and what to sort it by as part of the function…

OK, for post 0.6:

> Chicago also notes Idem and Op.cite and loc.cite, which it recommends > against.

This is PERFECT!!! I remember this in a thread from a while back but
couldnt find it so I was left tracing what was taking place which can
be a pain.

Anyway, I suppose one way to test use of FXSL is to write a function
that correctly (and very quickly) does the above?

Yep… I will do that sop we can compare.

My strategy in the existing code was to then add information gleaned in
the above process to the records in the temporary tree, so that there’s
no double hit on performance.

You hold the FXSL created data in a variable in the same way, just
less code in between. So you only take the hit once unless further
transformation is needed later in the stylesheet.

I really think this is the best way to go and will mention this to
Dimitre as he will undoubtedly be happy to hear about this and will
suggest even faster ways to do thins without a doubt!

That’s wrong. The second should be number as listed in biblist.

Bruce

OK, sounds good.

Let me know where we stand on the 0.6 bugs David. Unfortunately, today
is hell day on the work front.

Bruce