Here is the fix for the root sitemap context dir change.
(so the root sitemap does not have to be directly inside the
servlet context dir)
I removed the prefix-length and the starts-with-prefix check.
At least the exmaples seem to work fine with this.
Could someone apply this to the HEAD branch?
--
Torsten
Index: org/apache/cocoon/environment/AbstractEnvironment.java
===================================================================
RCS file:
/home/cvspublic/xml-cocoon2/src/org/apache/cocoon/environment/AbstractEnvironment.java,v
retrieving revision 1.24
diff -u -r1.24 AbstractEnvironment.java
--- org/apache/cocoon/environment/AbstractEnvironment.java 2001/10/25 19:32:59
1.24
+++ org/apache/cocoon/environment/AbstractEnvironment.java 2001/11/01 13:27:11
@@ -176,8 +176,10 @@
getLogger().debug("Changing Cocoon context(" + context + ") to prefix(" +
prefix + ")");
getLogger().debug("\tfrom context(" + this.context.toExternalForm() + ") and
prefix(" + this.prefix + ")");
getLogger().debug("\tat URI " + uri);
+/**
if(prefix.length()>=1){
if (uri.startsWith(prefix)) {
+**/
this.prefix.append(prefix);
uri = uri.substring(prefix.length());
@@ -207,6 +209,7 @@
this.context = f.toURL();
}
}
+/**
} else {
getLogger().error("The current URI ("
+ uri + ") doesn't start with given prefix ("
@@ -218,6 +221,7 @@
);
}
}
+**/
getLogger().debug("New context is " + this.context.toExternalForm());
this.uris = uri;
}
Index: org/apache/cocoon/sitemap/SitemapManager.java
===================================================================
RCS file:
/home/cvspublic/xml-cocoon2/src/org/apache/cocoon/sitemap/SitemapManager.java,v
retrieving revision 1.1
diff -u -r1.1 SitemapManager.java
--- org/apache/cocoon/sitemap/SitemapManager.java 2001/10/25 10:34:00 1.1
+++ org/apache/cocoon/sitemap/SitemapManager.java 2001/11/01 13:27:11
@@ -56,6 +56,9 @@
super.configure(sconf);
this.sitemapFileName = sconf.getAttribute("file");
+ if (this.sitemapFileName == null) {
+ throw new ConfigurationException("You need to specify a root sitemap!");
+ }
String value = sconf.getAttribute("check-reload", "yes");
this.checkSitemapReload = !(value != null && value.equalsIgnoreCase("no") ==
true);
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]