You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by bu...@apache.org on 2003/10/30 06:24:35 UTC

DO NOT REPLY [Bug 24240] New: - Generate/XInclude/CInclude from cocoon:// has wrong context

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24240>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24240

Generate/XInclude/CInclude from cocoon:// has wrong context

           Summary: Generate/XInclude/CInclude from cocoon:// has wrong
                    context
           Product: Cocoon 2
           Version: 2.1.2
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: Major
          Priority: Other
         Component: core
        AssignedTo: dev@cocoon.apache.org
        ReportedBy: matthew@3months.com


The error is that it's resolving the URL in the wrong context. Eg,

<map:match pattern="ground/">
  <map:generate src="withxinclude.xml"/>
  <map:serialize type="xml"/>
</map:match>

<map:match pattern="**">
  <map:generate src="cocoon://ground/"/>
  <map:transform type="xinclude"/>
  <map:serialize type="xml"/>  
</map:match>

(start of "withxinclude.xml")

<?xml version="1.0" encoding="utf-8"?>
<xi:include href="cocoon://internal/tree/"
xmlns:xi="http://www.w3.org/2001/XInclude"/>

(end of file)

This reproduces the error. However, if you change the pipeline to directly
reference the file,

<map:match pattern="**">
  <map:generate src="withxinclude.xml"/>
  <map:transform type="xinclude"/>
  <map:serialize type="xml"/>  
</map:match>

then there is no error.

//

Because it gets the context wrong, it has a file not found error.

java.io.FileNotFoundException: /opt/tomcat/webapps/ROOT/tree/tree2xhtml.xsl (No
such file or directory)

Where if it had looked for the file in the right place it would have looked in
/opt/tomcat/webapps/ROOT/internal/tree/tree2xhtml.xsl.

(BTW. There is no problem with /internal/tree/ )