You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Torsten Curdt <tc...@dff.st> on 2000/12/08 14:31:43 UTC

RE: xinclude sitemap + including concept

Argh! Me stupid! I changed the wrong sitemap mapping
so xinclude wasn't used at all. Mucho mucho sorry!

This works:

   <map:match pattern="include">
    <map:generate src="test/include.xml"/>
    <map:transform type="xinclude"/>
    <map:transform src="test/html.xsl"/>
    <map:serialize/>
   </map:match>

But as soon as I add the "serverpages" type:

   <map:match pattern="include">
    <map:generate type="serverpages" src="test/include.xml"/>
    <map:transform type="xinclude"/>
    <map:transform src="test/html.xsl"/>
    <map:serialize/>
   </map:match>

xinclude behaves different. Now I get
a java.net.MalformedURLException because I didn't
specified the protocol (e.g. "http://" or "file://").
If I do so via file:// it works, too. (ugly)

-

What I actually want to achieve is to combine two
XSPGenerators. Like a page wrapper around other pages.
(even "serverpages")

I thought this might be possible with xinclude.
But I fear this will only work if the included
page is not a "serverpage" and has no XSP in it.

Lets say a serverpage is generated
like this:

class _index extends XSPGenerator{
  public void generate() throws SAXException {
    /* build page via SAX events */

    XSPGenerator mycontent = new _content();
    mycontent.generate();

    /* build page via SAX events */
  }
}

and another one

class _content extends XSPGenerator{
  public void generate() throws SAXException {
    /* build page via SAX events */
  }
}

Any comments on this?
--
Torsten