1. File: org.apache.xindice.core.query.XPathQueryResolver.ResultSet.prepareNextNode():1195 Version: Xindice 1.1b4-dev (checked out of CVS on 2004-03-05) Added: DBDocument d = (DBDocument) context.getDocument(keySet[keyPos++]); if (d == null) { continue; } Node n = d.getDocumentElement(); >>> if(n == null) continue; // +++ ysimmhan. fixes problem when empty document seen () XPathContext xpc = new XPathContext(); PrefixResolver pfx; if (pr == null) { pfx = new PrefixResolverDefault(d.getDocumentElement()); xp = new XPath(query, null, pfx, XPath.SELECT, errors); } else { pfx = pr; if (xp == null) { xp = new XPath(query, null, pfx, XPath.SELECT, errors); } } Reason: When an XPath query is run against an empty document of the form '', then Node 'n' is null and an exception is thrown later when using it. This fixes the problem. For more information, refer bug report: http://nagoya.apache.org/bugzilla/show_bug.cgi?id=22155 _______________________________________________ Yogesh L. Simmhan ysimmhan@cs.indiana.edu