You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by "Baun, Kevin" <kb...@cghtech.com> on 2004/03/31 20:11:26 UTC

XSP importing XSP

Okay so lets say I have an xsp and I have it set up in cocoon as
cocoon:\\int_stuff. int_stuff works fine on it's own.

Now I want to include this into another xsp. but insteed of doing:
<map:part src="cocoon:/one"/>
<map:part src="cocoon:/two"/>
<map:part src="cocoon://int_stuff"/>
<map:part src="cocoon:/three"/>

I want to actually put it "inline" call it right from inside the xsp. can I
do that? if so anyideas on how?

Thanks very much,
-Mel
-----Original Message-----
From: Christopher Painter-Wakefield [mailto:paint007@mc.duke.edu]
Sent: Wednesday, March 31, 2004 11:18 AM
To: users@cocoon.apache.org
Subject: sitemap resources (was: Cocoon chapters for download)






This may be off-topic, but a line in Chapter 6 caught my eye:
"Currently, the only place in Cocoon where you can use sitemap resources is
for redirects."

Is this a new restriction in C2.1?  I'm currently using resources like
macros in my <map:match> clauses via <map:call resource="resource-name"/>
in C2.0.3.  I'd hate to have to rewrite my sitemap when we upgrade to 2.1!

-Christopher



|---------+---------------------------->
|         |           "Matthew Langham"|
|         |           <mlangham@s-und-n|
|         |           .de>             |
|         |                            |
|         |           03/31/2004 04:59 |
|         |           AM               |
|         |           Please respond to|
|         |           users            |
|         |                            |
|---------+---------------------------->
 
>---------------------------------------------------------------------------
-----------------------------------|
  |
|
  |       To:       <us...@cocoon.apache.org>, <de...@cocoon.apache.org>
|
  |       cc:
|
  |       Subject:  Cocoon chapters for download
|
 
>---------------------------------------------------------------------------
-----------------------------------|




I have been in contact with SAMS, the publisher of our Cocoon book. They
already provide a free download of Chapter 6 (A User's look at the Cocoon
Architecture). They have now agreed to provide Chapter 1 (An Introduction
to
Internet Applications) as a free download. Chapter 1 basically details the
history of building Internet/Web applications and outlines why Cocoon is
the
best choice when considering a platform today.

Chapters 1 and 6 are available here:

http://www.s-und-n.de/sunshine/ccos/CBA-Chapter1.pdf
http://www.s-und-n.de/sunshine/ccos/CBA-Chapter6.pdf

Currently the SAMS/NewRiders Site only has chapter 6.

Enjoy.

Matthew


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org





---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: XSP importing XSP

Posted by Alexandre Victoor <al...@fr.adp.com>.
Hello

You can also use directly the source resolver of your XSP by writing 
something like this :

<xsp:logic>
...
source = resolver.resolveURI("cocoon://whatever_you_need", null, null);
SourceUtil.toSAX(source, new IncludeXMLConsumer(contentHandler));
...
</xsp:logic>

Hope it helps

Alex


At 09:29 01/04/2004 +0200, you wrote:
>What do you need from the imported xsp? If you just need the XML output 
>from the xsp, that's fairly easy -- you could have a map:match in your 
>sitemap that matches *.xml and transforms the  xsp with the same name:
>
><map:match pattern="*.xml">
>   <map:generate src="{1}.xsp" type="serverpages"/>
>   <map:serialize type="xml"/>
></map:match>
>
>Then use c:include to import the XML output in another xsp:
>
><c:include src="cocoon:/myotherdoc.xml"/>
>
>If you want to include a complete xsp textually, I'm not sure if that's 
>possible -- someone else will have to answer the question
>
>John
>
>Baun, Kevin wrote:
>
>>Okay so lets say I have an xsp and I have it set up in cocoon as
>>cocoon:\\int_stuff. int_stuff works fine on it's own.
>>
>>Now I want to include this into another xsp. but insteed of doing:
>><map:part src="cocoon:/one"/>
>><map:part src="cocoon:/two"/>
>><map:part src="cocoon://int_stuff"/>
>><map:part src="cocoon:/three"/>
>>
>>I want to actually put it "inline" call it right from inside the xsp. can I
>>do that? if so anyideas on how?
>>
>>Thanks very much,
>>-Mel
>>
>>
>
>--
>---------------------------------------------------------
>Jentro Technologies GmbH
>John L. Webber, Software Development
>---------------------------------------------------------
>Rosenheimer Str. 145e       81671 München
>Tel. +49 89 189 169 80     mailto:John.Webber@jentro.com Fax  +49 89 189 
>169 99     http://www.jentro.com
>---------------------------------------------------------
>NOTICE: The information contained in this e-mail is confidential or may 
>otherwise be legally privileged. It is intended for the named recipient 
>only. If you have received it in error, please notify us immediately by 
>reply or by calling the telephone number above and delete this message and 
>all its attachments without any use or further distribution of its 
>contents. Please note that any unauthorised review, copying, disclosing or 
>otherwise making use of the information is strictly prohibited. Thank you. 
>---------------------------------------------------------
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>For additional commands, e-mail: users-help@cocoon.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: XSP importing XSP

Posted by "John L. Webber" <Jo...@jentro.com>.
What do you need from the imported xsp? If you just need the XML output 
from the xsp, that's fairly easy -- you could have a map:match in your 
sitemap that matches *.xml and transforms the  xsp with the same name:

<map:match pattern="*.xml">
   <map:generate src="{1}.xsp" type="serverpages"/>
   <map:serialize type="xml"/>
 </map:match>

Then use c:include to import the XML output in another xsp:

<c:include src="cocoon:/myotherdoc.xml"/>

If you want to include a complete xsp textually, I'm not sure if that's 
possible -- someone else will have to answer the question

John

Baun, Kevin wrote:

>Okay so lets say I have an xsp and I have it set up in cocoon as
>cocoon:\\int_stuff. int_stuff works fine on it's own.
>
>Now I want to include this into another xsp. but insteed of doing:
><map:part src="cocoon:/one"/>
><map:part src="cocoon:/two"/>
><map:part src="cocoon://int_stuff"/>
><map:part src="cocoon:/three"/>
>
>I want to actually put it "inline" call it right from inside the xsp. can I
>do that? if so anyideas on how?
>
>Thanks very much,
>-Mel
>
>  
>

-- 
---------------------------------------------------------
 Jentro Technologies GmbH
 John L. Webber, Software Development
---------------------------------------------------------
 Rosenheimer Str. 145e	    81671 München
 Tel. +49 89 189 169 80     mailto:John.Webber@jentro.com 
 Fax  +49 89 189 169 99     http://www.jentro.com
---------------------------------------------------------
NOTICE: The information contained in this e-mail is confidential or may otherwise be legally privileged. It is intended for the named recipient only. If you have received it in error, please notify us immediately by reply or by calling the telephone number above and delete this message and all its attachments without any use or further distribution of its contents. Please note that any unauthorised review, copying, disclosing or otherwise making use of the information is strictly prohibited. Thank you. 
---------------------------------------------------------


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org