Bertrand Delacretaz wrote:

> On Thursday 20 December 2001 19:48, Berin Loritsch wrote:
> 
>>What about using the XInclude or CInclude transformers?  You can
>>incorporate XML from other sources like this:
>>
>><xi:include href="cocoon://resource"/>
>><xi:include href="foo.xml?xpath(foo/bar[@baz='huh'])"/>
>>
> 
> If I understand well, xi:include would allow me to include the output of a 
> completely different URL as long as it produces XML?
> 
> like:
> <xi:include href="http://myCocoonServer/myParsedHtmlDataSource.xml";>
> 
> If yes, this is exactly what I was looking for - thanks!
> 
> 

Absolutely, AND you don't have to open an HTTP connection to do it!

Remember that Cocoon has multiple protocols that you can use (I think
CIncludeTransformer handles all of them better, but try the more
standard XIncludeTransformer).

context://  (returns a resource relative to your installed webapp root)
resource:// (returns a resource in a classloader)
cocoon:/    (returns a pipeline from the current sitemap)
cocoon://   (returns a pipeline relative to the root sitemap)

None of these open up an expensive socketconnection like the http://
protocol in your example.

But yes, this is exactly what you were looking for!

-- 

"They that give up essential liberty to obtain a little temporary safety
  deserve neither liberty nor safety."
                 - Benjamin Franklin


---------------------------------------------------------------------
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