[XSL-LIST Mailing List Archive Home]
[Reply To This Message]
Re: complex positioning problem
Subject: Re: complex positioning problem|
From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx>
Date: Fri, 29 Oct 2004 12:31:13 -0400
It's good you have temporary trees because you're going to run multiple
passes to handle this one.
I'd try doing this by first processing the entire document expanding my
citations into an (ad-hoc, locally-namespaced) markup format that provides
each citation or footnote reference with whatever information it needs
apart from the first/subsequent rule (that is, as if they were thence to be
rendered all alike irrespective of their positions in the final list), and
then in a second pass introduce the Ibid/Idem, op.cit., etc. based on their
positions relative to one another. The rest of the second pass could be an
identity transform otherwise, assuming there's nothing else it is useful
for it to do.
Since I'm not tracking your overall processing I can't say how this would
best dovetail with whatever multiple passes you have already (whether this
would best be before, after or during what you already have happening). But
I do hear from pioneers who have experimented with multiple passes over
temporary trees that it can be a very clean and even performant way of
handling transforms in general, given an architecture up to the job (which
XSLT 2.0 and Saxon certainly should be giving you).
Sorry not to be more explicit, but maybe a hint's enough.
At 08:53 AM 10/29/2004, you wrote:
I've got another design question that I find difficult to label with a
neat subject line.
I'm continuing working on my bibliographic/citation stylesheets, and now
need to tackle two new classes, with similar issues.
The most difficult one is note (footnote/endnote) style, whereby rendering
of citations is determined by their relative position within the
text. For example, we have:
On the first occurrence of a citation reference, we have one
rendering. On all subsequent, we have another (shorter).
2) Ibid/Idem, op.cit.
When a parameter is switched on, then if one has the same single citation
repeated immediately subsequent, then it gets rendered as "Ibid", if the
same group of citations repeat, it's "Idem".
My current code processes bibliography and citations in separate modes,
and there's not really any interaction between them (which is actually a
problem in some ways because the bib records get rendered regardless of
whether or not they're cited in the text). But here that won't work;
rendering of both citations and bib list needs to get driven by the citations.
The other class with a related problem is numbered style, whereby
citations get numbered based on their occurrence in the text (if repeated,
though, there's no new number), and then the bibliography gets sorted by
that number. So, you get  and [2-4] and [1, 5]
So how do I approach this problem? Again, using 2.0, where I am using
=== input ===
<?xml version="1.0" encoding="utf-8"?>
<para>Some citations: <citation><biblioref linkend="one"/><biblioref
Wendell Piez mailto:wapiez@xxxxxxxxxxxxxxxx
Mulberry Technologies, Inc. http://www.mulberrytech.com
17 West Jefferson Street Direct Phone: 301/315-9635
Suite 207 Phone: 301/315-9631
Rockville, MD 20850 Fax: 301/315-8285
Mulberry Technologies: A Consultancy Specializing in SGML and XML
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format