[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: misc. confusion on "footnote" handling

Subject: Re: misc. confusion on "footnote" handling
From: Bruce D'Arcus <bdarcus@xxxxxxxxxxxxx>
Date: Wed, 25 Aug 2004 08:38:54 -0400
different kinds of footnotes
Hi Jeni,

On Aug 25, 2004, at 4:56 AM, Jeni Tennison wrote:

It's not clear whether you actually want a parameter (declared with xsl:param, set on the call with xsl:with-param) or you're using the term 'parameter' in a more descriptive way. Perhaps you want two different templates for the two different kinds of citation:

<!-- citations appearing in footnotes -->
<xsl:template match="db:footnote/db:citation">
  ...
</xsl:template>

<!-- other citations -->
<xsl:template match="db:citation">
  ...
</xsl:template>

I found it hard to explain this. Let me try again:


Let's just take the simple case of a citation within a paragraph.

There are something like four or five different classes of citation styles.

Author-year would render the citation as (Doe, 1999)
Numbered would be like (1)

... and footnote would be, well, a footnote mark, and then the full reference would be placed in the footnote (typically instead of in a bibliography at the end)

So, I need to accommodate these vastly different classes. My thought was thus to have a global parameter called class. I just got stuck trying to understand how to handle this across different templates. So based on your examples, I'd probably want a choose option that did something like the following?

<xsl:template match="db:citation">
  <xsl:choose>
    <xsl:when test="$class='footnote'">
      <footnote>
        <xsl:apply-templates select="." mode="citation" />
      </footnote>
    </xsl:when>
    <xsl:otherwise>
      <xsl:apply-templates select="." mode="citation" />
    </xsl:otherwise>
  </xsl:choose>
</xsl:template>

Bruce

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.