|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: misc. confusion on "footnote" handling
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: 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
|
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
|

Cart








