You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by "John L. Webber" <Jo...@jentro.com> on 2004/04/01 09:29:25 UTC

Re: XSP importing XSP

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


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