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: Adding an attribute to the <body> of the TOC file


Hello,

-------------------
Problem description
-------------------
I'm generating the TOC in a separate file whose name
is generated automatically: bk01-toc.html
I am trying to add a new attribute to the <body>
element of this file.

-------------------
My solution
-------------------
I override the body.attributes template.
In my customized template, I generate the filename of
the current chunk and test if it contains the 'toc'
string.

<xsl:variable name="filename">
            <xsl:apply-templates select="."
mode="chunk-filename"/>
</xsl:variable>
<xsl:message>Testing filename: <xsl:value-of
select="$filename"/></xsl:message>

<xsl:if test="contains($filename,'toc')">
            <xsl:attribute
name="class">test</xsl:attribute>
</xsl:if>

-------------------
Troubles
-------------------
The result returned in the filename variable is
index.html and not bk01-toc.html

-------------------
Questions
-------------------
Why is this happening? What template should I use to
get bk01-toc.html?

Could I use a different approach to solve my problem
(without generating the filename of the current
chunk)?

Thank you,


---------------
mailto: ileana.patrolea@yahoo.com
tel: +40 724 511 514

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


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