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=3646>.
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=3646

           Summary: Bug in XIncludeTransformer (File Not Found)
           Product: Cocoon 2
           Version: 2.0b1
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: sitemap components
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


When the first XML file with a xinclude tag is loaded, the internal variable 
current_xmlbase_uri is set to the path of that xml file.
When another xml file is invoked which lies in another path, the 
current_xmlbase_uri remains the same (the methods which sets the variable 
aren't invoked again), so a file not found exception is thrown. E.g.:

================
c:\menu.xml
c:\path\test1.xml (xinclude with ../menu.xml)
c:\path\another_path\test2.xml (xinclude with ../../menu.xml)

Invoking path/test1.xml works correctly. Invoking path/another_path/test2.xml 
after that throws a file not found exception: c:\path\../../menu.xml is not 
found.
================

Workaround:
Use src attribute on <map:transform type="xinclude"/>. Additionally this would 
make the transformer cacheable (right now it issn't). I have changed the 
transformer (without support for caching) to use the src attribute for me and 
it works fine.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to