cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sylvain Wallez <>
Subject Re: [Ann/RFC] Virtual Sitemap Components
Date Mon, 11 Apr 2005 18:24:03 GMT
Stefano Mazzocchi wrote:

> Sylvain Wallez wrote:
>> Uh? Are you saying that any <map:generator> without a class attribute 
>> will be interpreted as a VPC?
> Well, a little more complex than this, a generator is virtual if:
>  1) doesn't have a src attribute
>  2) his first child is <generator>
>  3) contains zero or more following transformers
> a transformer is virtual if:
>  1) doesn't have a src attribute
>  2) contains one or more <transformer>
> a serializer is virtual if:
>  1) doesn't have a src attribute
>  2) contains zero or more <transformer>
>  3) its last child is a <serializer>

Weird, as both humans and programs reading a sitemap will have to do 
some look-ahead to know if an element is a regular component or a VPC. 
This requires IMO to put to much intelligence in the component manager. 
With a distinctive element name, it's just a matter of associating a 
default class with a shorthand in the roles file.

> [still have to decide about selectors]

Well, control structures are a must-have in VPCs, or they loose a large 
part of their interest. And with control structures, your approach 
requires some in-depth exploration to search for distinguishing elements.

>> -1 as it will produce erroneous "sitemap syntax error" messages when 
>> it should be "missing class attribute".
> that can be fixed in a completely back-compatible way, as for the 
> above rationale.
> From the outside, there is no difference between a virtual generator 
> and a generator, therefore I don't see why there should be a 
> difference in the schema semantics that define them.

I agree that from the outside there's no difference. And this outside is 
both other sitemap/blocks and the <map:pipelines> section in the same 

I'm only discussing the readability for both programs and humans of the 
<map:components> section.


Sylvain Wallez                        Anyware Technologies  
Apache Software Foundation Member     Research & Technology Director

View raw message