cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robin Green" <gree...@hotmail.com>
Subject Re: Basic question on including other pages
Date Sun, 24 Sep 2000 20:52:00 GMT
Maarten van den Dungen <maarten@shortcut.nl> wrote:
>Currently I am studying the documentation on Cocoon for a project we have
>to do. I like it a lot, but somehow I can't find out how to include other
>pages in an xslt-form at the point where the reference is situated in the
>xslt. In jsp there is a jsp:include tag which does just that, e.g. to
>insert the content in a table cell. I imagine in Cocoon there is a similar
>construct which would take an xslt and an xml and put the formated content
>in its place. I have a feeling this should be really easy, or am I missing
>the point? Any help appreciated. Thanks.

With XSLT, there are at least two ways (for XSP ways see the FAQ).

1) To include an XML file unprocessed use <xsl:copy-of 
select="document('myfile.xml')"/> (note the relative URL)

2) To include an XML result from Cocoon, use <xsl:copy-of 
select="document('http://myserver.com/myfile.xml')"/> but don't forget, in 
myfile.xml you must put the processing instruction <?cocoon-format 
type="text/xml"?> or it will generate HTML, not well-formed XML - and 
non-XML content cannot be included in that way.



_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

Share information about yourself, create your own public profile at 
http://profiles.msn.com.


Mime
View raw message