Thorsten Scherler schrieb:
On Fri, 2009-07-24 at 10:35 +0200, Andreas Hartmann wrote:
Thorsten Scherler schrieb:
Hi all,
I am doing the following in a resource type:
<!-- {format}.xml/{pubId}/{area}/{uuid}/{language} -->
<map:match pattern="*.xml/*/*/*/*">
...
<map:transform
src="fallback://lenya/modules/multiple/xslt/eventns2xhtml.xsl">
<map:parameter name="uuid" value="{4}"/>
<map:parameter name="language" value="{5}"/>
<map:parameter name="pubid" value="{2}"/>
<map:parameter name="area" value="{3}"/>
</map:transform>
...
Then in the xsl I am doing something like:
<ci:include
src="lenya-document:{$uuid},pub={$pubid},area={$area},lang={language}"/>
When I activate the include I get a resource not found. Commenting the
include transformer I can see:
<include xmlns="http://apache.org/cocoon/include/1.0"
src="lenya-document:99d4b560-7657-11de-ab18-cfa0f9cda2d1,pub=festivales,area= \
authoring,lang= \ es" />
The problem are the " \ " before the lang and area. I am not
sure why I get the params like that.
Somebody has seen this before?
No, that doesn't look familiar. But it should be easy to track down the
component inserting the strange strings by traversing the stack in the
debugger.
For now I make a dirty hack in xsl with substring() but yeah I need to
track this down. Which class do you recommend to start the debugging,
since {3} is coming from the match.
I guess I'd start with XSLTTransformer.setup() where the parameters are
passed. Another trick is using a FileGenerator in the sitemap to see if
the URI has already been invalid. Check the SourceNotFoundException
error message to see the replacements of the wildcards:
<map:generate src="{1}/{2}/{3}/{4}"/>
-- Andreas
--
Andreas Hartmann, CTO
BeCompany GmbH
http://www.becompany.ch
Tel.: +41 (0) 43 818 57 01
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]