You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Stephan Coboos <cr...@gmx.net> on 2003/10/30 17:12:53 UTC
CIncludeTransformer now with sitemap params?
Hello,
because I needed a CIncludeTransformer which is able to include dynamically
resources, I had modificated the CIncludeTransformer a little bit. Now its
possible to pass sitemap parameters to the transformer. Within the src
attribute the variable will be replaced by the value of the parameter. Does
anyone need this feature, too?
For example:
somefile.xml:
<element ...>
<...:include src="cocoon:/{filename}"/>
</element>
pipeline:
...
<map:transform type="cinclude">
<map:parameter name="filename" value="myFile.xml"/>
</map:transform>
...
Result:
<element ...>
<...:include src="cocoon:/myFile.xml"/>
</element>
Regards
Stephan
Re: CIncludeTransformer now with sitemap params?
Posted by Joerg Heinicke <jh...@virbus.de>.
Hello Stephan,
sorry, but I don't like it that much. It looks like not needed
featuritis. The dynamic including can be more than easily and more
flexible done with XSLT. Furthermore there can occur non-obvious
collisions in the parameter names: The CIncludeTransformer already
accepts several parameters.
Please don't take any offense, it's just my opinion.
Regards,
Joerg
On 30.10.2003 17:12, Stephan Coboos wrote:
> Hello,
>
> because I needed a CIncludeTransformer which is able to include dynamically
> resources, I had modificated the CIncludeTransformer a little bit. Now its
> possible to pass sitemap parameters to the transformer. Within the src
> attribute the variable will be replaced by the value of the parameter. Does
> anyone need this feature, too?
>
> For example:
>
> somefile.xml:
>
> <element ...>
> <...:include src="cocoon:/{filename}"/>
> </element>
>
> pipeline:
>
> ...
> <map:transform type="cinclude">
> <map:parameter name="filename" value="myFile.xml"/>
> </map:transform>
> ...
>
> Result:
>
> <element ...>
> <...:include src="cocoon:/myFile.xml"/>
> </element>
>
> Regards
> Stephan