Thank you Andreas,
I was also twiddling with the files a bit and I was able to achieve the same
effect by adding <map:part src="site:/{6}/leftmenu" element="lm"/> in the
sitemap for pattern="lenyabody-raw-*/*/*/*/*/*/**" and then used
<xsl:apply-templates select="lm/xhtml:html/xhtml:body/xhtml:[EMAIL PROTECTED] =
'leftmenu']"/> in page2xhtml.xsl. Are there any pitfalls in using this kind of
approach rather than the simpler solution (using the include transformer) that
you had given?
regards,
Ramesh
----- Original Message ----
From: Andreas Hartmann <[EMAIL PROTECTED]>
To: [email protected]
Sent: Thursday, October 16, 2008 4:15:10 AM
Subject: Re: Newbie question - strategy to develop a simple website
Hi Ramesh,
Ramesh Chandra schrieb:
> So I am planning to use the following strategy.
> 1. Create the following documents which contain xhtml fragments
> a)/header b)/leftmenu c)/footer
> 2. Create documents for each page containing only the "Content" part
> 3. Edit page2xhtml.xsl so that it would automatically include
> /header, /leftmenu and /footer automatically at appropriate
> positions.
> 4. /leftmenu, /header can be edited at any later time by the editor
> (without needing to tinker with xsl), so that the whole website is
> affected at one go.
> The question is 'How do I implement Step 3'?
to include a document using its language and sitetree path, you can use
the IncludeTransformer [1] with the site protocol [2]:
<i:include src="site:/{$language}/footer"/>
[1]
http://cocoon.apache.org/2.1/apidocs/org/apache/cocoon/transformation/IncludeTransformer.html
[2] http://lenya.apache.org/docu20/reference/protocols/siteprotocol.html
HTH,
-- Andreas
--
Andreas Hartmann, CTO
BeCompany GmbH
http://www.becompany.ch
Tel.: +41 (0) 43 818 57 01
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]