A completely different approach would be to populate that with
JavaScript using, e.g. document.title.replace(/"/g,""), to get the
contents of head/title from the generated html document.

David

> -----Original Message-----
> From: Bob Stayton [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, January 24, 2008 4:44 PM
> To: [email protected]; Sam Steingold
> 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
> [EMAIL PROTECTED]
> 
> 
> ----- Original Message -----
> From: "Sam Steingold" <[EMAIL PROTECTED]>
> To: <[email protected]>
> Sent: Wednesday, January 23, 2008 2:08 PM
> Subject: [docbook-apps] where is the title of the current chunk?
> 
> 
> > -----BEGIN PGP SIGNED MESSAGE-----
> > 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="[EMAIL PROTECTED]"/>.
> > 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!
> > -----BEGIN PGP SIGNATURE-----
> > Version: GnuPG v1.4.6 (GNU/Linux)
> > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
> >
> > iD8DBQFHl7rWPp1Qsf2qnMcRAo8vAJ0YvqSThrMu21vgHnQ4Fo1p3WQjjQCglztl
> > EwVdHQuIUFe/ms+SstO4hlQ=
> > =xYpt
> > -----END PGP SIGNATURE-----
> >
> >
> > 
> ---------------------------------------------------------------------
> > 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]
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to