Hi,
The test is failing because the context node is legalnotice, not
legalnotice/title. A legalnotice is handled by the template with
match="legalnotice" and mode="titlepage.mode" in fo/titlepage.xsl. It
calls the formal.object.heading template, with the context still being the
legalnotice element. That template applies the formal.title.properties
attribute set. So change:
parent::legalnotice
to
self::legalnotice
and it should work.
Most of the templates handling titles work with the container of the title
through most of the process. That's largely because a given element's
title could come from more than one element, e.g., book/title or
book/info/title.
I don't know of a command line tool that reveals which templates are being
used. If someone writes one, please let me know! I generally use an XSL
debugger like Oxygen when I have to follow the template sequence.
Bob Stayton
Sagehill Enterprises
DocBook Consulting
[EMAIL PROTECTED]
----- Original Message -----
From: "spr" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Thursday, October 04, 2007 4:54 AM
Subject: [docbook-apps] Howto customize title for legalnotice
I want the title "IMPORTANT NOTICE" generated for "legalnotice" to be in
red
color.
But unable to get it working with code below:
<xsl:attribute-set name="formal.title.properties">
<xsl:attribute name="color">
<xsl:choose>
<xsl:when test = "parent::legalnotice">red</xsl:when>
<xsl:otherwise>black</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
Also tried "parent::info/legalnotice" in the test above.
What could be going wrong?
Is there a command-line tool that would tell me which XSL template is
being
applied during transformation?
Would save may such queries?
~spr
--
View this message in context:
http://www.nabble.com/Howto-customize-title-for-legalnotice-tf4568304.html#a13038248
Sent from the docbook apps mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]