FXSL

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

FXSL

Bruce D'Arcus
On Apr 2, 2005, at 9:41 PM, M. David Peterson wrote:

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

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:

5. Farmwinkle, Humor of the Midwest, 241.
6. Ibid., 258-59
7. Ibid.
8. Ibid., 333-34

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

<citation><biblioref linkend="farmwinkle" unit="page"
begin="241"/></citation>
<citation><biblioref linkend="farmwinkle" unit="page" begin="258"
end="259"/></citation>
<citation><biblioref linkend="farmwinkle" unit="page" begin="258"
end="259"/></citation>
<citation><biblioref linkend="farmwinkle" unit="page" begin="333"
end="334"/></citation>

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



Reply | Threaded
Open this post in threaded view
|

Re: FXSL

M. David Peterson-2
On Apr 3, 2005 8:21 AM, Bruce D'Arcus <[hidden email]> wrote:

>
> On Apr 2, 2005, at 9:41 PM, M. David Peterson wrote:
>
> > 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:
>
<snip/>
> 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!

>
> Bruce
>
> -------------------------------------------------------
> SF email is sponsored by - The IT Product Guide
> Read honest & candid reviews on hundreds of IT Products from real users.
> Discover which products truly live up to the hype. Start reading now.
> http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
> _______________________________________________
> xbiblio-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/xbiblio-devel
>


--
<M:D/>

:: M. David Peterson ::
XML & XML Transformations, C#, .NET, and Functional Languages Specialist


Reply | Threaded
Open this post in threaded view
|

Re: FXSL

Bruce D'Arcus
In reply to this post by Bruce D'Arcus
On Apr 3, 2005, at 10:21 AM, Bruce D'Arcus wrote:

> 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

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

Bruce



Reply | Threaded
Open this post in threaded view
|

Re: FXSL

Bruce D'Arcus
In reply to this post by M. David Peterson-2
On Apr 3, 2005, at 10:34 AM, M. David Peterson wrote:

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

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