cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Torsten Curdt" <tcu...@dff.st>
Subject RE: xinclude sitemap + including concept
Date Fri, 08 Dec 2000 13:31:43 GMT
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

Mime
View raw message