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: Re: [docbook-apps] trademark customisation

I'm afraid in XSL-FO there is no option to "test" for the current font-size and switch to an appropriate action.  That's because the XSLT step is separate from the XSL-FO step.  In XSLT, you can do xsl:choose to take different actions.  But the resolved font-size is not known until the XSL-FO step after all property inheritance has been resolved, and XSL-FO does not have a choose function.
In the XSLT stage, you can test for various ancestor elements that you know produce small type and take action there.
Bob Stayton
Sagehill Enterprises
----- Original Message -----
Sent: Sunday, May 10, 2009 10:31 AM
Subject: [docbook-apps] trademark customisation

I have customised the registration mark handling like this:
<xsl:template name="dingbat">
  <xsl:param name="dingbat">bullet</xsl:param>
  <xsl:variable name="symbol">
[ snip ]
      <xsl:when test="$dingbat='registered'">
        <fo:inline baseline-shift="super" font-size="75%" inline-progression-dimension="100%">&#x00AE;</fo:inline>
[ snip ]
All works well, but I want to extend this so that when the font size for registration make is (say) less than 8pt then just output the registration character without the superscript and font size reduction, as at some point it becomes difficult to read. [ I have the (r) on both the cover page and in the footer ].
The question is: how to test the active font size, so I can switch behaviour accordingly?

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