cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Fennell, Philip" <>
Subject Xinclude transformer has changed behaviour with Saxon 8.7.1+
Date Mon, 19 Jun 2006 11:38:31 GMT
I have previously posted regarding this problem, and have been rather
busy since then, but this time I have an example test case for someone
to mull over.

With Windows XP sp2, Cocoon 2.1.8, Tomcat 5.5 and Saxon 8.6.1 or 8.7
configured as the default XSLT transformer I was able to embed
xi:include instructions within source documents and have Cocoon's
Xinclude processor resolve the URL (relative to the source document)


<xi:include href="../../content/resources/site/login.xml">
  <xi:fallback>login.xml not included.</xi:fallback> </xi:include>

However, when I moved to Saxon 8.7.1 (and also with 8.7.3) the xinclude
fails to locate the referenced file unless I change the href attribute
so that the url is relative to the current Cocoon context.


<xi:include href="content/resources/site/login.xml">
  <xi:fallback>login.xml not included.</xi:fallback> </xi:include>

Important Note:

It is important to understand that I am 'NOT' using Cocoon to process
the requested document but rather to process the request (by using
Cocoon's request generator) information itself, which includes a
refernece to the original requested document. The request info is
transformed into an 'envelope' containing the request parameters, HTTP
header info and an interface definition file that may contain xi:include
instructions that reference additional static content. It is these
xi:include instructions that are at the centre of the problem. The
example is in:


The Cocoon pipeline match that does all the work can be found starting
at line 182 of sitemap.xmap.

During the processing, the requested content and referenced content
merged and transformed into XHTML within the main rendering transform:



To run the test webapp that I have attached you will need to set-up
Cocoon as follows:

1) Add the following lines to cocoon/WEB-INF/cocoon.xconf:

  <component logger="core.xslt-processor"
    <parameter name="use-store" value="true"/>
    <parameter name="incremental-processing" value="false"/>
    <parameter name="transformer-factory"

after the Xalan component declaration.

2) Get Saxon 8.7 and 8.7.3 from and place the
following jars in cocoon/WEB-INF/lib


3) Unpack the attached ZIP file ( in your cocoon directory

4) Use the following link to access the test page:


(Depending on host and port number etc you may need to tweak this url.)

I am cross-posting this on the saxon-help mailing list too as they may
have a view as to what may have changed that has contributed to this new


Philip Fennell

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message