You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Hubert Holtz <Tu...@gmx.net> on 2003/03/20 17:07:39 UTC
How to include XSP at certain places in XML?
Hello,
I know I can include static XML content at any place with cinclude, that works fine, but how can I include
the result of an XSP file in a XML file, at a place of my choice ( i need some database entries to build up the
whole site, that's why I nedd XSP inside my XML) ?
I know that you can aggregate XSP and XML with the help of the sitemap, but if I use this option I don't
have the possibilty to place the result of the xsp code insight my xml file, only before or after a certain xml file
and I don't want to split my xml files in 10 lines long pieces to puzzle them together in the sitemap, that
wouldn't make any sense, but would work :-)
So if anybody of you knows how to do it, and I'm sure somebody does, please tell me,
because I searched for an answer in this list (the messages of the last 3 months) but couldn't find any solution.
And I have a second question, what's the difference between cinclude and xinclude, is there any?
Thanks in advance.
Regards
Steve
---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org
Re: How to include XSP at certain places in XML?
Posted by Yves Vindevogel <yv...@implements.be>.
You can only use an XSP as a generator, thus you must use that first in the
pipeline.
Secondly, you could use an XSL file to render that file.
In that XSL you can use e.g. the document() function to include the other XML
file.
If you need to include two XSP in one pipeline, you must call them with the
cocoon:// prefix, in order to have them generated.
I also think you can use the CInclude and XInclude with that method.
You could include with the cocoon:// prefix
> Hello,
>
> I know I can include static XML content at any place with cinclude, that
> works fine, but how can I include the result of an XSP file in a XML file,
> at a place of my choice ( i need some database entries to build up the
> whole site, that's why I nedd XSP inside my XML) ?
> I know that you can aggregate XSP and XML with the help of the sitemap, but
> if I use this option I don't have the possibilty to place the result of the
> xsp code insight my xml file, only before or after a certain xml file and I
> don't want to split my xml files in 10 lines long pieces to puzzle them
> together in the sitemap, that wouldn't make any sense, but would work :-)
>
> So if anybody of you knows how to do it, and I'm sure somebody does, please
> tell me, because I searched for an answer in this list (the messages of the
> last 3 months) but couldn't find any solution.
>
> And I have a second question, what's the difference between cinclude and
> xinclude, is there any?
>
> Thanks in advance.
>
> Regards
> Steve
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org
--
Met vriendelijke groeten,
Kind regards,
Bien à vous,
Yves Vindevogel
Implements
Kempische Steenweg 206 -- 3500 Hasselt -- Belgium
Phone/Fax: +32 (11) 43.55.76 -- Mobile: +32 (478) 80.82.91
Mail: yves.vindevogel@implements.be -- www.implements.be
Quote: The winner never says participating is more important than winning.
---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org
Re: How to include XSP at certain places in XML?
Posted by Scherler <th...@wyona.org>.
Hello,
Hubert Holtz wrote:
>Hello,
>
>I know I can include static XML content at any place with cinclude, that works fine, but how can I include
>the result of an XSP file in a XML file, at a place of my choice ( i need some database entries to build up the
>whole site, that's why I nedd XSP inside my XML) ? I know that you can aggregate XSP and XML with the help of the sitemap, but if I use this option I don't
>have the possibilty to place the result of the xsp code insight my xml file, only before or after a certain xml file
>and I don't want to split my xml files in 10 lines long pieces to puzzle them together in the sitemap, that
>wouldn't make any sense, but would work :-)
>
>
Ok, I would reckon that writting a xst transform would be quick.
Just do the aggregation and and tranform it like that:
<xsl:template match="dbresult">
<db>
<results><xsl:copy-of select="dbresult"/></results>
<xsp>
<xsl:copy-of select="xspresult"/>
</xsp>
</db>
</xsl:template>
have a look at http://wiki.cocoondev.org/Wiki.jsp?page=Jars2exclude to
see another transformation.
>And I have a second question, what's the difference between cinclude and xinclude, is there any?
>
>
Not really 100% sure but I thing xinclude is for static and cinclude for
stylesheets.
King regards
Thorsten
---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org
Re: How to include XSP at certain places in XML?
Posted by Hubert Holtz <Tu...@gmx.net>.
Thanks for your help Goeff, I simply didn't know this cocoon:/ pseudo-protocol stuff, works fine.
Regards
Steve
*********** REPLY SEPARATOR ***********
On 20.03.2003 at 11:25 Geoff Howard wrote:
>with cinclude using the cocoon:/ or cocoon:// pseudo-protocol. If you
>have
>a pipeline that serves your xml fragment matching on myStuff.xsp, then
>you'd call it with cocoon:/myStuff.xsp in the src of cinclude. The
>cocoon:/ resolves relative to the current sitemap, where cocoon://
>resolves
>relative to the root sitemap. This is in the docs and the wiki, and
>samples I think.
>
>Geoff
>
>At 11:07 AM 3/20/2003, you wrote:
>>Hello,
>>
>>I know I can include static XML content at any place with cinclude, that
>>works fine, but how can I include
>>the result of an XSP file in a XML file, at a place of my choice ( i need
>>some database entries to build up the
>>whole site, that's why I nedd XSP inside my XML) ?
>>I know that you can aggregate XSP and XML with the help of the sitemap,
>>but if I use this option I don't
>>have the possibilty to place the result of the xsp code insight my xml
>>file, only before or after a certain xml file
>>and I don't want to split my xml files in 10 lines long pieces to puzzle
>>them together in the sitemap, that
>>wouldn't make any sense, but would work :-)
>>
>>So if anybody of you knows how to do it, and I'm sure somebody does,
>>please tell me,
>>because I searched for an answer in this list (the messages of the last 3
>>months) but couldn't find any solution.
>>
>>And I have a second question, what's the difference between cinclude and
>>xinclude, is there any?
>>
>>Thanks in advance.
>>
>>Regards
>>Steve
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
>>For additional commands, e-mail: cocoon-users-help@xml.apache.org
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
>For additional commands, e-mail: cocoon-users-help@xml.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org
Re: How to include XSP at certain places in XML?
Posted by Geoff Howard <co...@leverageweb.com>.
with cinclude using the cocoon:/ or cocoon:// pseudo-protocol. If you have
a pipeline that serves your xml fragment matching on myStuff.xsp, then
you'd call it with cocoon:/myStuff.xsp in the src of cinclude. The
cocoon:/ resolves relative to the current sitemap, where cocoon:// resolves
relative to the root sitemap. This is in the docs and the wiki, and
samples I think.
Geoff
At 11:07 AM 3/20/2003, you wrote:
>Hello,
>
>I know I can include static XML content at any place with cinclude, that
>works fine, but how can I include
>the result of an XSP file in a XML file, at a place of my choice ( i need
>some database entries to build up the
>whole site, that's why I nedd XSP inside my XML) ?
>I know that you can aggregate XSP and XML with the help of the sitemap,
>but if I use this option I don't
>have the possibilty to place the result of the xsp code insight my xml
>file, only before or after a certain xml file
>and I don't want to split my xml files in 10 lines long pieces to puzzle
>them together in the sitemap, that
>wouldn't make any sense, but would work :-)
>
>So if anybody of you knows how to do it, and I'm sure somebody does,
>please tell me,
>because I searched for an answer in this list (the messages of the last 3
>months) but couldn't find any solution.
>
>And I have a second question, what's the difference between cinclude and
>xinclude, is there any?
>
>Thanks in advance.
>
>Regards
>Steve
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
>For additional commands, e-mail: cocoon-users-help@xml.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org
Re: How to include XSP at certain places in XML?
Posted by Stavros Kounis <go...@osmosis.gr>.
i have the same problem but
i put the xml content i recieve from xsp inot a container element with
specific ID
<container id="datacontent">
</container>
i use aggregation in sitemap but one of the aggregated files is a
layout.xml with placement instructions
after the aggregation the first transformation is through a layout.xsl
that make the reordering of the element ant produce the final xml ready
for transformation
all this is part of a project we R working on but it is not ready for
publish
i can send you this part of transformation
but i dont know if its legal to send email with attachments in this list
On Thu, 20 Mar 2003, Hubert Holtz wrote:
> Hello,
>
> I know I can include static XML content at any place with cinclude, that works fine, but how can I include
> the result of an XSP file in a XML file, at a place of my choice ( i need some database entries to build up the
> whole site, that's why I nedd XSP inside my XML) ?
> I know that you can aggregate XSP and XML with the help of the sitemap, but if I use this option I don't
> have the possibilty to place the result of the xsp code insight my xml file, only before or after a certain xml file
> and I don't want to split my xml files in 10 lines long pieces to puzzle them together in the sitemap, that
> wouldn't make any sense, but would work :-)
>
> So if anybody of you knows how to do it, and I'm sure somebody does, please tell me,
> because I searched for an answer in this list (the messages of the last 3 months) but couldn't find any solution.
>
> And I have a second question, what's the difference between cinclude and xinclude, is there any?
>
> Thanks in advance.
>
> Regards
> Steve
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org
>
>
--
Stavros S. Kounis
Development & Research Department
Osmosis - networks & consulting services
web: http://www.osmosis.gr
email: info@osmosis.gr
---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org