Maybe something like that would already be sufficient:
--- Jenny.java 2003-03-16 15:47:31.000000000 +0100
+++ Jenny.java.orig 2003-03-16 15:45:30.000000000 +0100
@@ -90,6 +90,9 @@
/** Indicates whether extrenal references should be followed or not */
private boolean online = true;
+ /** basedir of workspace configuration file */
+ private String basedir = null;
+
DocumentBuilderFactory dFactory = DocumentBuilderFactory.newInstance();
TransformerFactory tFactory = TransformerFactory.newInstance();
@@ -101,6 +104,11 @@
private Document parse(String source) throws Exception {
try {
DocumentBuilder dBuilder = dFactory.newDocumentBuilder();
+
+ if (this.basedir != null) {
+ source = this.basedir + source;
+ }
+
return dBuilder.parse(source);
} catch (SAXParseException e) {
System.err.print("Error parsing file " + source);
@@ -379,6 +387,13 @@
*/
private Jenny(String source, boolean online) throws Exception {
this.online = online;
+
+ // set basedir if available
+ this.basedir = source.substring(0, source.lastIndexOf('/') + 1);
+
+ // remove basedir from workspace file
+ source = source.substring(source.lastIndexOf('/'));
+
// Obtain the date to be used
Date lastModified = new Date();
Tilman Giese
try {
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]