OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Access to ancestor Font-size definition


On 18 avr. 2008, at 01:20, Bob Stayton wrote:
Hello,

A long time ago I had a problem for resizing fonts in different context and Bob gave me this answer which until today.
> <fo:inline xmlns:fo="http://www.w3.org/1999/XSL/Format"; font-family="LucidaGrande" font-weight="normal">
> <xsl:attribute name="font-size">
>   <xsl:choose>
>     <xsl:when test="ancestor::title
>                     or ancestor::literal
>                     or ancestor::filename
>                     or ancestor::programlisting
>                     or ancestor::literallayout">0.9em</xsl:when>
>     <xsl:otherwise>0.8em</xsl:otherwise>
>   </xsl:choose>
> </xsl:attribute>


I found that in some case the font-size is too big or too small. So I tried to correct by using, instead of 0.9em size the ancestor font-size and a value. The first problem is to access to the ancestor font size :

             <xsl:attribute name="font-size">
                <xsl:choose>
                    <xsl:when test="ancestor::d:title
                        or ancestor::d:info
                        or ancestor::d:literal
                        or ancestor::d:filename
                        or ancestor::d:programlisting
                        or ancestor::d:literallayout"><xsl:value-of select="ancestor::?????"/></xsl:when>
                    <xsl:otherwise>0.75em</xsl:otherwise>
                </xsl:choose>
            </xsl:attribute>

And I don't know what to put to replace my ?????

May be I'm on the wrong way, but I have no other ideas.

Thanks in advance for your help,

Jacques


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]