Le 23 mai 05, � 16:20, Holt, David a �crit :
...I didn't realise we could use Cinclude to call out other pipelines from our main pipeline. This sounds like just what I need. Are there some examples I can refer to?
The CInclude docs are at http://cocoon.apache.org/2.1/userdocs/transformers/cinclude- transformer.html
Also, the "CInclude Content Aggregation" sample at http://localhost:8888/samples/aggregation/ shows a simple example, the matcher that handles it is
<map:match pattern="aggregate4">
<map:generate src="aggregate.xml"/>
<map:transform type="cinclude"/>
<map:transform type="xsltc" src="stylesheets/news.xsl"/>
<map:serialize/>
</map:match>
in src/webapp/samples/aggregation/sitemap.xmap
Going back to your original use-case, replacing
<field id="S1" type="last_price"/>
With a value looked up using a SOAP call: if you can create a generator
which outputs the required data given a URL like
/soap-query/S1/last_price for example, then it's only a matter of
transforming the above <field> to
<cinclude:include src="cocoon:/soap-query/S1/last_price"/> So you don't necessarily need a SOAP query transformer.If your documents contain many such <field>, a transformer might be more efficient. But if it's a single or a couple <field> per document, the generator + cinclude combination should be ok.
I'm no expert on our SOAP stuff, and as usual there are probably other ways - but this would work for sure, using standard components.
-Bertrand
smime.p7s
Description: S/MIME cryptographic signature
