Hi Bob,
This does not seem to work. I already modify the space-* values in that
attribute set, so I just added your middle six lines. I also tried to
remove the choose/when bit, but in both cases the BNF were in normal
font size, not xx-small.
/Tomas
On 2016-11-13 23:51, Bob Stayton wrote:
Hi Tomas,
Since the font-size change is being made on the same element that uses
an attribute-set, you can customize the attribute-set instead to make
the font-size conditional on the element. An attribute-set is
evaluated each time it is applied.
For example:
<xsl:attribute-set name="formal.object.properties">
<xsl:attribute name="font-size">
<xsl:choose>
<xsl:when test="self::d:productionset">xx-small</xsl:when>
<xsl:otherwise>inherit</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
</xsl:attribute-set>
Here I used 'inherit' as the 'otherwise' value because the stock
"formal.object.properties" attribute-set does not set a font-size
attribute, so it inherits the current font-size.
Bob Stayton
Sagehill Enterprises
b...@sagehill.net
On 11/6/2016 4:39 AM, Tomas By wrote:
Hello one more time,
I feel that the EBNF blocks are too weird in normal font size, so I
changed them to extra small using a template, as below
(font-size="xx-small", line 6).
This works fine, but seems very ham-fisted.
Is there a better way to do this?
/Tomas
|<xsl:template match="d:productionset">
| <xsl:variable name="id"><xsl:call-template
name="object.id"/></xsl:variable>
| <xsl:choose>
| <xsl:when test="d:title">
| <fo:block id="{$id}"
xsl:use-attribute-sets="formal.object.properties"
| font-size="xx-small" >
| <xsl:call-template name="formal.object.heading">
| <xsl:with-param name="placement" select="'before'"/>
| </xsl:call-template>
| <fo:table table-layout="fixed" width="100%">
| <fo:table-column column-number="1" column-width="3%"/>
| <fo:table-column column-number="2" column-width="15%"/>
| <fo:table-column column-number="3" column-width="5%"/>
| <fo:table-column column-number="4" column-width="52%"/>
| <fo:table-column column-number="5" column-width="25%"/>
| <fo:table-body start-indent="0pt" end-indent="0pt">
| <xsl:apply-templates
select="d:production|d:productionrecap"/>
| </fo:table-body>
| </fo:table>
| </fo:block>
| </xsl:when>
| <xsl:otherwise>
| <fo:table id="{$id}" table-layout="fixed" width="100%">
| <fo:table-column column-number="1" column-width="3%"/>
| <fo:table-column column-number="2" column-width="15%"/>
| <fo:table-column column-number="3" column-width="5%"/>
| <fo:table-column column-number="4" column-width="52%"/>
| <fo:table-column column-number="5" column-width="25%"/>
| <fo:table-body start-indent="0pt" end-indent="0pt">
| <xsl:apply-templates
select="d:production|d:productionrecap"/>
| </fo:table-body>
| </fo:table>
| </xsl:otherwise>
| </xsl:choose>
|</xsl:template>
---------------------------------------------------------------------
To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
For additional commands, e-mail:
docbook-apps-h...@lists.oasis-open.org
---------------------------------------------------------------------
To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org
---------------------------------------------------------------------
To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org