You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Michael Homeijer <M....@devote.nl> on 2002/03/12 09:03:49 UTC

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"/>

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

TIA,
Michael

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


Re: Castor transformer or generator?

Posted by "Piroumian, Konstantin" <KP...@flagship.ru>.
> 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
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> For additional commands, email: cocoon-dev-help@xml.apache.org
>

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