Daniel Fagerstrom wrote:
What about reversing the logic: Instead of
>>> <map:match pattern="test5">
>>> <map:generate type="servletService" src="test.html">
>>> <map:parameter name="service"
value="servlet:test2:/extract-html"/>
>>> </map:generate>
>>> <map:serialize type="xml"/>
>>> </map:match>
we could use
<map:match pattern="test5">
<map:generate type="servletService" src="servlet:test2:/extract-html">
<map:parameter name="data" value="test.html"/>
</map:generate>
<map:serialize type="xml"/>
</map:match>
It doesn't make that much difference for generators, but would save
one line each for serializers and transformers.
WDYT?
It would save a line, but especially for the generator it would obscure
the function. For all other generators the src parameter is used for
*reading* stream input. With your proposal the data parameter would
instead get that role and the src parameter would be used as something
that is a service that you post something to. I think that would be more
confusing.
Also for the servlet service transformer and serializer, "src" sound
like something you read from rather than something you post to.
hmm, the "src" attribute of generators desribes, what is feed into the
component. In the case of a servlet service generator, the output stream of a
servlet is used as stream input.
The "data" parameter defines the content that is passed to the servlet service.
IMO that's not the starting point of the generator.
--
Reinhard Pötz Independent Consultant, Trainer & (IT)-Coach
{Software Engineering, Open Source, Web Applications, Apache Cocoon}
web(log): http://www.poetz.cc
--------------------------------------------------------------------