Hi all, Until now, you could not use relative file names with <util:include-file>. The attached patch makes it work; for example : <util:include-file name="data.xml"/> would include the file named data.xml in directory $TOMCAT_HOME/webapps/cocoon/
I guess it makes <util:get-file-contents> work as well. I hope it does not break anything, and that you will find it useful. Regards, Arnaud Bienvenu http://www.generasound.com/
Index: src/org/apache/cocoon/components/language/markup/xsp/XSPUtil.java =================================================================== RCS file: /home/cvspublic/xml-cocoon2/src/org/apache/cocoon/components/language/markup/xsp/XSPUtil.java,v retrieving revision 1.2.2.3 diff -u -r1.2.2.3 XSPUtil.java --- src/org/apache/cocoon/components/language/markup/xsp/XSPUtil.java 2001/08/20 14:07:27 1.2.2.3 +++ src/org/apache/cocoon/components/language/markup/xsp/XSPUtil.java 2001/10/04 +12:16:24 @@ -94,7 +94,9 @@ return filename; } Context context = (Context) objectModel.get(Constants.CONTEXT_OBJECT); - return NetUtils.getPath(context.getResource(filename).toExternalForm()); + filename = context.getResource(filename).toExternalForm(); + int i = filename.indexOf(':'); + return (i > -1) ? filename.substring(i+1,filename.length()) : filename; } public static boolean isAlphaNumeric(char c) {
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]