You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@lenya.apache.org by Sean Fulton <fu...@cmu.edu> on 2004/07/16 17:32:09 UTC

Title in page2xhtml.xsl

Hello,

I'm using the binary package incubating-lenya-1.2-bin.tar.gz with Tomcat.

In the default page2xhtml.xsl there is no <title> tag. I've been poking 
through files and documentation and can't figure out how to add titles. 
What variable do I access? Any help/pointer appreciated.

	Sean



---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-user-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-user-help@cocoon.apache.org


Re: Title in page2xhtml.xsl

Posted by Sean Fulton <fu...@cmu.edu>.
On 2004-07-18 00:18:35 -0400, "Matt Collins" <u4...@anu.edu.au> said:

> 
> Hi Sean,
> 
>> In the default page2xhtml.xsl there is no <title> tag. I've been poking
>> through files and documentation and can't figure out how to add titles.
> 
> This is how I worked around it -- others solutions may be better:
> 
> In xhtml2xhtml.xsl:
> 
> <xsl:template match="/xhtml:html">
>   <div id="title">
>     <xsl:value-of select="xhtml:body/xhtml:h1"/> [or xhtml:head/xhtml:title]
>   </div>
>   <div id="body">
>     (snip)
>   </div>
> </xsl:template>
> 
> In page2xhtml.xsl:
> 
> <xsl:template match="cmsbody">
>   (snip)
>       <title><xsl:value-of select="xhtml:div[@id = 'title']"/></title>
>   (snip)
> </xsl:template>
> 
> Matt
> 

Thanks Matt, I'll try that.

Is there a reason we can't do something like <xsl:value-of 
select="dc:title"/> ?


	Sean



---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-user-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-user-help@cocoon.apache.org


Re: Title in page2xhtml.xsl

Posted by Matt Collins <u4...@anu.edu.au>.
Hi Sean,

> In the default page2xhtml.xsl there is no <title> tag. I've been poking
> through files and documentation and can't figure out how to add titles.

This is how I worked around it -- others solutions may be better:

In xhtml2xhtml.xsl:

<xsl:template match="/xhtml:html">
  <div id="title">
    <xsl:value-of select="xhtml:body/xhtml:h1"/> [or xhtml:head/xhtml:title]
  </div>
  <div id="body">
    (snip)
  </div>
</xsl:template>

In page2xhtml.xsl:

<xsl:template match="cmsbody">
  (snip)
      <title><xsl:value-of select="xhtml:div[@id = 'title']"/></title>
  (snip)
</xsl:template>

Matt



---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-user-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-user-help@cocoon.apache.org