Hi Arjen,
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of
> Arjen Zwerver
> Sent: woensdag 27 augustus 2008 12:34
> To: Hippo CMS development public mailinglist
> Subject: [HippoCMS-dev] Including content with webdav-request
> and xi:include
>
> Hi,
>
> I'm have a hippoCMS setup with Xopus as editor. I generate
> the XSL for Xopus through a cocoon-pipeline in the
> extensions-folder. In this pipeline, I use xinclude to
> include the menu's which are dynamic. In, for example,
> home.xsl this looks like:
>
> <xi:include href="cocoon://extensions/laatstenieuws?lang=nl"
> parse="xml"/>
>
> This tag calls another pipeline which generates the html to
> be included.
> This pipeline contains the following code:
>
> <map:match pattern="laatstenieuws">
> <map:generate type="jx" src="jx/laatstenieuws.xml">
> <map:parameter name="target"
> value="{repository:files}"/>
> <map:parameter name="lang"
> value="{request-param:lang}"/>
> </map:generate>
> <map:transform type="webdav"/>
> <map:transform src="styles/laatstenieuws.xsl">
> <map:parameter name="use-request-parameters"
> value="true"/>
^^^^^^^^ Try not to use this
The use-request-parameters passes ALL request parameters to
laatstenieuws.xsl
For the CMS it doesn't really matter but for websites it may kill your
caching strategy.
> <map:parameter name="document"
> value="{request-param:document}"/>
I don't see a request-param named document in your xi:include. May this
be the problem?
> </map:transform>
> <map:transform type="xinclude"/>
> <map:serialize type="xmlzonder"/> </map:match>
>
> In laatstenieuws.xml I have the dasl-query:
>
> <request xmlns="http://hippo.nl/webdav/1.0"
> xmlns:webdav="http://hippo.nl/webdav/1.0"
> xmlns:D="DAV:"
> xmlns:jx="http://apache.org/cocoon/templates/jx/1.0"
> xmlns:h="http://hippo.nl/cms/1.0"
> xmlns:slide="http://jakarta.apache.org/slide/"
> target="${cocoon.parameters.target}"
> method="SEARCH"
> include-content="true">
> <header name="Depth" value="infinity"/>
> <body>
> <D:searchrequest>
> ...
> </D:searchrequest>
> </body>
> </request>
>
> laatstenieuws.xsl generates the html from the result of the
> webdav map:transform. Because I want the html to contain the
> title in the content I used
>
> <xsl:value-of select="webdav:content/root/body/title"/>
>
> Now when I call http://adres/extensions/laatstenieuws?lang=nl
> it gives me the correct menu with the titles of the items included.
>
> But as soon as the pipeline is called through the xi:include
> the title is just an empty string, because webdav:content
> appears to be empty.
>
> Why is the webdav:content-tag empty when I include it through
> an xi::include and how can I fix it?
>
Jasha Joachimsthal
[EMAIL PROTECTED] - [EMAIL PROTECTED]
www.onehippo.com
Amsterdam - Hippo B.V. Oosteinde 11 1017 WT Amsterdam +31(0)20-5224466
San Francisco - Hippo USA Inc. 101 H Street, suite Q Petaluma CA
94952-3329 +1 (707) 773-4646
********************************************
Hippocms-dev: Hippo CMS development public mailinglist
Searchable archives can be found at:
MarkMail: http://hippocms-dev.markmail.org
Nabble: http://www.nabble.com/Hippo-CMS-f26633.html