cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Scott Jones <sc...@on-sitemanager.com>
Subject Re: XInclude before XSP Processing [C1 -> C2]
Date Wed, 17 Oct 2001 14:34:37 GMT
Hi Phil,

If your XML documents are static pages, then Xinclude will work just
perfectly for you (mine are additional XSP).  

So, in order to do it, you'd have to have an entry like this in your
sitemap:

<map:match pattern="*.xsp">
  <map:generate type="serverpages" src="XML/content/{1}.xml"/>
  <map:transform type="xinclude"/>
  <map:transform src="XML/stylesheets/html.xsl"/>
  <map:serialize/>
</map:match>

In your XSP document, you'd need something like:

<xsp:page 
  language="java"
  xmlns:xsp="http://apache.org/xsp"
  xmlns:xinclude="http://www.w3.org/2001/XML/xinclude"> 
  <!-- then when you're ready -->
  <xinclude:include parse="xml" href="includeme.xml"
xml:base="context:///XML/includes"/>
.
.
.

That should do it, I think.  The problem that I'm dealing with is that
I'd like my includes to get processed as XSP.  Apparently you can do an
<xinclude:include parse="xml" href="cocoon://includeme.xml"/> which
actually would be an additional pipeline which would get processed
before being included.  This will work for me, but will make things a
bit less efficient.  I'm also thinking about just constructing a section
in my "generate" stage (while XSP is processing) where I store all of
the information that needs to be shared between my different includes,
and then using XSLT to put the pieces into the right places in a
"Transform" stage later on...

Anyways, hope this helps! 

Cheers,

Scott


On Tue, 2001-10-16 at 23:40, Phil Blake wrote:
> Hi Scott,
> 
> Did you ever get an answer to the XInclude before XSP question?
> 
> I am trying to do a similar thing (I think) in which I want an XSP page 
> to include a series of XML documents within it, then apply the 
> stylesheet.
> 
> Thanks for you time,
> 
> Phil
> 
> 



---------------------------------------------------------------------
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: <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail: <cocoon-users-help@xml.apache.org>


Mime
View raw message