You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by "Philip Fennell (JIRA)" <ji...@apache.org> on 2006/07/13 09:29:37 UTC
[jira] Updated: (COCOON-1881) Xinclude transformer has changed
behaviour with Saxon 8.7.1
[ http://issues.apache.org/jira/browse/COCOON-1881?page=all ]
Philip Fennell updated COCOON-1881:
-----------------------------------
Attachment: xinclude.tar.gz
I have enclosed the test case refered to in the description of this bug.
> Xinclude transformer has changed behaviour with Saxon 8.7.1
> -----------------------------------------------------------
>
> Key: COCOON-1881
> URL: http://issues.apache.org/jira/browse/COCOON-1881
> Project: Cocoon
> Type: Bug
> Components: Blocks: (Undefined)
> Versions: 2.1.8, 2.1.10-dev (current SVN)
> Reporter: Philip Fennell
> Attachments: xinclude.tar.gz
>
> 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) correctly.
> e.g.
> <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.
> e.g.
> <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:
> xinclude/interface/config/login.xml
> 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:
> xinclude/interface/transforms/xhtml/screen.xsl
> ===============
> 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"
> role="org.apache.excalibur.xml.xslt.XSLTProcessor/saxon"
> class="org.apache.excalibur.xml.xslt.XSLTProcessorImpl">
> <parameter name="use-store" value="true"/>
> <parameter name="incremental-processing" value="false"/>
> <parameter name="transformer-factory" value="net.sf.saxon.TransformerFactoryImpl"/>
> </component>
> after the Xalan component declaration.
> 2) Get Saxon 8.7 and 8.7.3 from http://www.saxonica.com/ and place the following jars in cocoon/WEB-INF/lib
> saxon8.jar
> saxon8-dom.jar
> saxon8-xpath.jar
> 3) Unpack the attached ZIP file (xinclude.zip) in your cocoon directory
> 4) Use the following link to access the test page:
> http://localhost:8080/cocoon/xinclude/interface/config/login.html
> (Depending on host and port number etc you may need to tweak this url.)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira