cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From TREGAN Fabien <Fabien.TRE...@airbus.com>
Subject RE: Source vs. Generator
Date Thu, 04 Jul 2002 06:39:42 GMT
I think I know wich raticle you are speaking about (I remember a note from
Sylvain Wallez saying that FileGenerator should no longer be called
FileGenerator but SourceGenerator, but I could not find it... try searching
for "SourceGenerator" with Marc, I have no web acces !)

Maybe one of these message will be of interest to you :

----------------------------------------------------------------------------
-------------------------------------


-----Message d'origine-----
De: Piroumian, Konstantin [mailto:KPiroumian@flagship.ru] 
Date: mardi 12 mars 2002 09:35
À: cocoon-dev@xml.apache.org
Objet: Re: Castor transformer or generator?


> Does anybody know why the castor transformer was actually built as a
> transformer while it probably fits more in Cocoon as a generator?
> Would the only difference be that the following two lines:
> <map:generate src="test.xml"/>
> <map:transform type="castor"/>
>
>  are written as:
> <map:generate type="castor" src="test.xml"/>

I think that it is a transformer because it actually transforms elements in
its namespace to their bean representation. And you can use any generator to
create the input for the transformer, e.g.: an XSP page (not only a static
xml file) can be used to generate dynamic markup including castor
transformer elements.

Of course, it can be also a generator, but in that case you would support
all possible sources of input markup.

> Are there any other things to consider when choosing between a transformer
> and a generator?

Depends on the purpose of the component.

>
> TIA,
> Michael

----------------------------------------------------------------------------
-------------------------------------

-----Message d'origine-----
De: Gianugo Rabellino [mailto:gianugo@apache.org] 
Date: jeudi 18 avril 2002 17:54
À: cocoon-dev@xml.apache.org
Objet: Re: (dbxml) Generator vs Source


Rogier Peters wrote:
> Hi Gianugo,
> 
> thanks for explaining, one more question: see below
> 
> 
>>>- What are the reasons behind deprecating xmldb-generator?
>>
>>There was no reason for it anymore, given that FileGenerator 
>>was able to 
>>handle the XML:DB pseudo protocol directly. A Source is much more 
>>flexible and there was no loss of functionality.
> 
> 
> Well... one thing I liked about the generator was that you could pass a
lot of stuff as parameters. Although in the original xmldb-generator only
the xpath parameter was used, but my custom generator also used depth
parameter, and because x-hive offers so much more options for querying in
their api, I can imagine I would need a lot of parameters.
> The way this is solved in the xmldb-source, by putting a # behind the url,
would IMHO become less elegant as more parameters are added.
> So I wonder what other mechanisms could be used for calling parameters on
a source, if I'm using different parameters in each map:mathch
> 

the "#" charachter was chosen because it seemed to be the most 
appropriate for XPath queries. It should indicate an XPointer but it's 
almost the same. Nothing, however, is forbidding you to extend the 
source so that parameters are taken into account in the usual way 
(xmldb:xhive://host/resource[#/xpath]?depth=1&whatever=youmightwant).

Ciao,

-- 
Gianugo Rabellino

----------------------------------------------------------------------------
-------------------------------------


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


Mime
View raw message