Re: [xsl] misc. confusion on "footnote" handling

Subject: Re: [xsl] misc. confusion on "footnote" handling
From: Bruce D'Arcus <bdarcus@xxxxxxxxxxxxx>
Date: Wed, 25 Aug 2004 16:44:18 -0400
On Aug 25, 2004, at 2:30 PM, Wendell Piez wrote:

The first pass would just wrap all citations not in footnotes, in footnotes. The second pass would handle all footnotes as footnotes, trusting that there won't be any footnotes not marked as such (since they're marked as citations).

Make sense? How amenable is your process to multiple passes? Using XSLT 2.0, as with the problem you had a week or two ago, this can be done transparently.

It's already based on multiple passes and XSLT 2.0, so it wouldn't be hard to do that.


Incidentally, another design pattern of which you might not be aware is to place most of your code in a common core, but have different stylesheets to invoke for running in different "modes".

This sounds interesting. Could you give me an example of what this might look like?


Currently I have a main stylesheet that looks just like this:

<!-- read the external citation style file -->
<xsl:param name="citation-style" required="yes" as="xs:string" />

<xsl:variable name="styles" as="document-node()"
  select="doc(concat('styles/',$citation-style, '.csl'))" />

<!-- set the citation class parameter (e.g. author-year) as specified in the style file -->
<xsl:param name="citation-class" select="$styles/cs:citationstyle/@class"/>


<xsl:include href="drivers/biblio-driver.xsl" />
<xsl:include href="drivers/document-driver.xsl" />
<xsl:include href="output/biblio-output.xsl" />
<xsl:include href="output/citation-output.xsl" />

Bruce

Current Thread