Lars Trieloff skrev:
Hi Daniel,
I was already starting to create a parametrizable BlockSource and
BlockConnection, when Alexander got the idea of creating an InputSource
that would be less invasive to the blocks-fw code.
How do you think should a postable source work? Don't you think
something like a transformer world be a better fit?
The advantage with a postable source instead of a sitemap component as
e.g. a transformer is that you can use it in any place where you want to
access a block service. It would be rather easy to use it from non
sitemap blocks. See
http://svn.apache.org/repos/asf/cocoon/trunk/core/cocoon-blocks-fw/cocoon-blocks-fw-demo1/src/main/java/org/apache/cocoon/blocks/demo1/DemoServlet.java
for an example of how to use the block protocol from a handwritten servlet.
This way you could
create XML from your request using the request generator, hand it to a
proxy-transformer which will create the Http-Request or the
Block-Request and return the results? The only problem would be
accessing non-xml resources.
See my answer to Alexander for a proposal on how to use a postable block
source together with a new generator, transformer, serializer and reader
for achiving what you ask for.
/Daniel