This is the mail archive of the docbook-apps@lists.oasis-open.org mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[docbook-apps] fixing framemaker's mistakes on alignment.


hello all. I'm attempting to fix the framemaker problem of giving things the
alignment of "aleft" "acenter" and "aright"

==============================
So My plan is everywhere that graphics.xsl is trying to assign the attribute
"align" a value:

<xsl:attribute name="align">
<xsl:choose>
  <xsl:when test="@align = 'center'">middle</xsl:when>
  <xsl:otherwise>
       <xsl:value-of select="@align"/>
  </xsl:otherwise>
</xsl:choose>
</xsl:attribute>

=========================
I'm going to call my function instead:

<xsl:attribute name="align">
    <xsl:call-template name="fixalign">
     <xsl:with-param name="alignment" select="@align"/>
    </xsl:call-template>
</xsl:attribute>

============================
My function is this:

<xsl:template name="fixalign">
<xsl:param name="alignment"/>
   <xsl:choose>
      <xsl:when test="$alignment = 'center'">middle</xsl:when>
	<xsl:when test="$alignment = 'acenter'">center</xsl:when>
	<xsl:when test="$alignment = 'aleft'">left</xsl:when>
	<xsl:when test="$alignment = 'aright'">right</xsl:when>
	<xsl:otherwise>
        <xsl:value-of select="$alignment"/>
      </xsl:otherwise>
    </xsl:choose>
</xsl:template>

================
but I keep getting a empty string back.. Why - I thought the template would
return whatever strings it outputs.

Help please?

Thanks!

LN


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]