Yes, that would work with xrefs.  But if you add color to your xrefs using the 'xref.properties' attribute set, then you will get that color because it would be applied inside the fo:inline.  In the stylesheet for this application, you could set the color attribute value to 'inherit' to get the outer color.

Bob Stayton
b...@sagehill.net

On 9/13/2021 11:41 PM, David Cramer wrote:
On 9/11/21 3:10 AM, Bob Stayton wrote:
It's main limitation is that it only is applied to text nodes in your
XML document, and so would not color generated text (like "Note" or
xrefs) or any rule lines.  If you can live with that limitation then
this is a simple solution.

And if you still need to be convinced that this simple solution is the
way to go, study the code that generates tables and contemplate
overriding every template until it does what you want :-)

Bob, would it handle the xrefs too by matching them, wrapping them in
the fo:inline/span, and then doing the apply-imports? Or would that
break the xref mechanism?

<xsl:template match="text()[ancestor::*[@doc =
'FAT']]|db:xref[ancestor-or-self::*[@doc = 'FAT']]">
   <fo:inline color="red">
     <xsl:apply-imports/>
   </fo:inline>
</xsl:template>

Regards,

David


---------------------------------------------------------------------
To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org


Reply via email to