cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vadim Gritsenko" <vadim.gritse...@verizon.net>
Subject RE: Nested map:parameter sets...
Date Fri, 31 May 2002 16:35:21 GMT
> From: Per Kreipke [mailto:per@onclave.com]
> 
> I'm new at C2 but it seems to me from looking at sitemap.xsl that the
> following (valid) sitemap snippet would result in some unintended
code:
> 
> <map:match patter="client.xml">
>  	<map:parameter name="client" value="magnet" />
> 
>  	<map:generate src="config/{client}.xml">
> 		<map:parameter name="affiliate" value="onclave" />
> 	</map:generate>
> 	<map:transform src="config/output.xsl">
> 		<map:parameter name="title" value="foo" />
> 	</map:transform>
>  	<map:serialize type="xml" />
> </map:match>
> 
> Every map:parameter generates a section of code that begins with:
> 
> param = new Parameters();
> 
> which would override outer parameter declarations.

This is intended behavior. Parameter declared in the element (match,
act, select, etc) is available only to this element, passed in the
setup() call, and not to nested elements.


> This would definitely happen in the specific XSL template
> "map:match//map:match" since there's no nested 'Parameters param'
> declaration.
> 
> Here's where I show my ignorance: shouldn't in fact the parameters be
a
> stack? I know that the MapResolver gets involved so maybe the
implementation
> already is a stack.

That's why it should not be a stack.

Vadim

 
> Per Kreipke


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message