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]

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


Your template should indeed return a string.  You might try temporarily
putting in some xsl:message elements to test the value of your parameters
and such.  That will tell you if your template is being called and with what
values.

Bob Stayton
Sagehill Enterprises
DocBook Consulting
bobs@sagehill.net


----- Original Message ----- 
From: "Webmaster" <Webmaster@comtrol.com>
To: <docbook-apps@lists.oasis-open.org>
Sent: Monday, April 11, 2005 3:53 PM
Subject: [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]