xsl-list
[Top] [All Lists]

variable question

2004-08-28 18:33:57
Is there some obvious reason why the "title-before" variable below doesn't work when called from within a template?

I'm not sure if the problem is that there's something wrong with the way I'm trying to use variables, or something about the context and the xpath expressions (my guess is the latter).

Bruce

<xsl:variable name="reftype">
  <xsl:choose>
    <xsl:when test="not[mods:relatedItem[(_at_)type='host']]">
      <xsl:text>book</xsl:text>
    </xsl:when>
    <xsl:when
test="mods:relatedItem[(_at_)type='host']/mods:originInfo/mods: issuance='continuing'">
      <xsl:text>article</xsl:text>
    </xsl:when>
    <xsl:when
test="mods:relatedItem[(_at_)type='host']/mods:originInfo/mods: issuance='monographic'">
      <xsl:text>chapter</xsl:text>
    </xsl:when>
  </xsl:choose>
</xsl:variable>

<xsl:variable name="title-before">
  <xsl:choose>
    <xsl:when test="$reftype='chapter'">
      <xsl:text>“</xsl:text>
    </xsl:when>
    <xsl:otherwise>
      <xsl:text></xsl:text>
    </xsl:otherwise>
  </xsl:choose>
</xsl:variable>


<Prev in Thread] Current Thread [Next in Thread>