Hi!

Usually, there are <map:parameter> elements which can be accessed in the
setup() method of a Transformer. But this kind of Parameter-providing allows
only simple String values and no hierachy at all. What I need is to pass
nested parameters into my Transformer.

I've written a class for filtering XML documents - implemented as a 
Transformer. 
It is target at extracting xml-fragments. The parameters I need are nested, 
like 

<map:match ....>

..
<map:transform ...>
    <ElementFilter-tree name="testtree">
        <ElementFilter name="report-definitions">
            <ElementFilter name="report" attribute="name" 
attribute-value="{1}">
                <ElementFilter name="title"/>
                <ElementFilter name="chart" attribute="name" 
attribute-value="{2}"/>
            </ElementFilter>
        </ElementFilter>
    </ElementFilter-tree>
  </map:transform>
</map:match>

Currently I load this data from a separate file, which is not very 
convienient. From
my point of view it should be in the sitemap and accessible to the Site 
Designer. 
Too make a long story short ... Is there any way to include this kind of 
parameter
in the sitemap and access it from the setup method. Any help here will be 
strongly
appreciated.

As a fallback I thought about passing in one parameter with CDATA, which I 
intend
to parse then inside the setup Method. Will this work? One very critical 
disadvantage
would be that I cannot use the parameter substitution anymore.

Regards, Danijel.

---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>

Reply via email to