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] where is the title of the current chunk?

Hi Sam,
It isn't clear from your snippet what the context is of the current 
template.  That would help understand what "node()" is in this context. 
Generally node() means to select all the child text and elements from the 
current context, so I doubt that is what you want.

You apply templates in mode="object.title.markup.textonly" when the context 
is an element with a title.  The select attribute needs to specify that 
element from the given context.  Perhaps you just want select="." to select 
the current element?

But I'm not sure how you would select the element that determines the chunk 
containing any given context.  It could check ancestors, but it would have 
to recursively move up through the sequence of ancestors to find the one 
that is the chunk node.  There is a recursive-chunk-filename template that 
walks up an element tree to find the chunk filename of the current context, 
but not the title of the chunk.

But if your context is already the element that is the chunk, the select="." 
would work.

Bob Stayton
Sagehill Enterprises

----- Original Message ----- 
From: "Sam Steingold" <sds@gnu.org>
To: <docbook-apps@lists.oasis-open.org>
Sent: Wednesday, January 23, 2008 2:08 PM
Subject: [docbook-apps] where is the title of the current chunk?

> Hash: SHA1
> I want to use the title of the current html chunk in a template.
> if I wanted to use the id, I would have written <input value="{@id}"/>.
> I tried
> <input><xsl:attribute name="value">
> ~         <xsl:apply-templates select="node()"
> ~                              mode="object.title.markup.textonly"/>
> ~ </xsl:attribute></input>
> but got nothing useful plus a ton of errors like
> No template for "/book/part/chapter/section/subtitle" (or any of its
> leaves) exists in the context named "title" in the "en" localization.
> so: where is the title?
> thanks!
> Version: GnuPG v1.4.6 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
> iD8DBQFHl7rWPp1Qsf2qnMcRAo8vAJ0YvqSThrMu21vgHnQ4Fo1p3WQjjQCglztl
> EwVdHQuIUFe/ms+SstO4hlQ=
> =xYpt
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
> For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org

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