Re: [xsl] configuring a conditional

Subject: Re: [xsl] configuring a conditional
From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx>
Date: Tue, 24 May 2005 11:54:06 -0400
Bruce,

At 11:44 AM 5/24/2005, you wrote:
I'd like to have a function, but thought I'd start with a variable first.

Hm ... I'd have thought the alternative to a function would be a template (named or called with an apply-templates) -- I see you're using the latter.


So then the question becomes, what's the context node from which the '@linkend' path is traversed? (We don't know for sure that's the problem, but it's worth checking.)

I see from your code that that will be a mods:mods element. Does it have a @linkend (does it have the correct one?).

If it's not otherwise clear (and even if it is), this can be checked fairly easily by including an <xsl:value-of select="@linkend"/> in your message, to tell whether @linkend is what it should be.

Cheers,
Wendell

Step 3:

  <xsl:template match="mods:mods" mode="citation_author-year">
    <xsl:param name="local-cite-style"/>
    <xsl:param name="cite-ref" as="element()*"/>
    <xsl:param name="citation"/>
    <xsl:param name="first-in-author-group" as="xs:boolean"/>
    <xsl:param name="last-in-author-group" as="xs:boolean"/>
    <xsl:message>
      <xsl:if test="$cite-ref is key('refs',@linkend)[1]">FIRST</xsl:if>
    </xsl:message>

...etc.



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

Current Thread