From: Wolfgang M. M. <wol...@us...> - 2004-09-12 13:25:24
|
Update of /cvsroot/exist/eXist-1.0/src/org/exist/xquery/functions/xmldb In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7794/src/org/exist/xquery/functions/xmldb Modified Files: XMLDBGetChildCollections.java Log Message: xmldb:get-child-collections function throws an XPathException if the specified collection does not exist. Index: XMLDBGetChildCollections.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/xquery/functions/xmldb/XMLDBGetChildCollections.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** XMLDBGetChildCollections.java 12 Sep 2004 09:25:16 -0000 1.2 --- XMLDBGetChildCollections.java 12 Sep 2004 13:25:15 -0000 1.3 *************** *** 70,79 **** ValueSequence r = new ValueSequence(); String child; ! for (Iterator i = collection.collectionIterator(); i.hasNext(); ) ! { ! child = (String) i.next(); ! r.add(new StringValue(child)); ! } ! return r; } --- 70,82 ---- ValueSequence r = new ValueSequence(); String child; ! if (collection != null) { ! throw new XPathException(getASTNode(), "Collection " + collectionURI + " does not exist"); ! } ! for (Iterator i = collection.collectionIterator(); i.hasNext(); ) ! { ! child = (String) i.next(); ! r.add(new StringValue(child)); ! } ! return r; } |