You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Conal Tuohy <co...@paradise.net.nz> on 2002/10/14 00:16:46 UTC

overloading sitemap variable names

> -----Original Message-----
> From: Geoff Howard [mailto:cocoongeoff@yahoo.com]

> How would this name overloading work with respect to:
> - references from resources back to their calling
> pipeline
> - from a subsitemap back to the mounting reference
>
> Seems these cases may make overloading desireable.
>
> Geoff Howard

I have some reservations at least about the 2nd case. I would be interested
to hear what other people think, because it seems to me that the practice of
a child block referring to named components within the parent block is a
complication worth avoiding.

It seems to me that a child block should not, as a matter of principle,
depend on its parent block containing a component with a particular
variable-name. This would complicate the interface between blocks, and make
it difficult to re-use them.

AFAIR the original plan for blocks envisaged information being passed only
in the URI, and if the child block needed access to some data from the
parent then the parent block could pass that data in the map:mount call,
avoiding a dependency on any particular name (effectively passing it as a
parameter).

Cheers

Con


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


Re: overloading sitemap variable names

Posted by Sylvain Wallez <sy...@anyware-tech.com>.
Conal Tuohy wrote:

>>-----Original Message-----
>>From: Geoff Howard [mailto:cocoongeoff@yahoo.com]
>>    
>>
>>How would this name overloading work with respect to:
>>- references from resources back to their calling pipeline
>>- from a subsitemap back to the mounting reference
>>
>>Seems these cases may make overloading desireable.
>>
>>Geoff Howard
>>    
>>
>
>I have some reservations at least about the 2nd case. I would be interested
>to hear what other people think, because it seems to me that the practice of
>a child block referring to named components within the parent block is a
>complication worth avoiding.
>
>It seems to me that a child block should not, as a matter of principle,
>depend on its parent block containing a component with a particular
>variable-name. This would complicate the interface between blocks, and make
>it difficult to re-use them.
>
>AFAIR the original plan for blocks envisaged information being passed only
>in the URI, and if the child block needed access to some data from the
>parent then the parent block could pass that data in the map:mount call,
>avoiding a dependency on any particular name (effectively passing it as a
>parameter).
>  
>

I agree with you, even if we're talking here of sub-sitemap, and not 
blocks which are a still-to-be-defined beast.

Resources are an integral part of a sitemap (think of it as a reusable 
pipeline snippet, or a subroutine), and thus named variables are visible 
from resources as from any other place in the sitemap.

Mounting is a different thing, and passing named variables to 
subsitemaps would introduce a coupling with the parent sitemap that 
isn't desirable.

Sylvain

-- 
Sylvain Wallez
  Anyware Technologies                  Apache Cocoon
  http://www.anyware-tech.com           mailto:sylvain@apache.org



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