You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@vxquery.apache.org by pr...@apache.org on 2012/10/04 20:55:49 UTC
svn commit: r1394209 -
/incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/node/FnCollectionScalarEvaluatorFactory.java
Author: prestonc
Date: Thu Oct 4 18:55:49 2012
New Revision: 1394209
URL: http://svn.apache.org/viewvc?rev=1394209&view=rev
Log:
VXQUERY-80 Added a check to the collection function to only load ".xml" functions. Found an issue where hidden files were breaking the function. (.DS_Store)
Modified:
incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/node/FnCollectionScalarEvaluatorFactory.java
Modified: incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/node/FnCollectionScalarEvaluatorFactory.java
URL: http://svn.apache.org/viewvc/incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/node/FnCollectionScalarEvaluatorFactory.java?rev=1394209&r1=1394208&r2=1394209&view=diff
==============================================================================
--- incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/node/FnCollectionScalarEvaluatorFactory.java (original)
+++ incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/node/FnCollectionScalarEvaluatorFactory.java Thu Oct 4 18:55:49 2012
@@ -81,10 +81,13 @@ public class FnCollectionScalarEvaluator
sb.reset(abvs);
for (int i = 0; i < list.length; ++i) {
// Add the document node to the sequence.
- abvsFileNode.reset();
- FunctionHelper.readInDocFromString(list[i].getPath(), in, abvsFileNode);
- nodep.set(abvsFileNode.getByteArray(), abvsFileNode.getStartOffset(), abvsFileNode.getLength());
- sb.addItem(nodep);
+ if (list[i].getPath().endsWith(".xml")) {
+ abvsFileNode.reset();
+ FunctionHelper.readInDocFromString(list[i].getPath(), in, abvsFileNode);
+ nodep.set(abvsFileNode.getByteArray(), abvsFileNode.getStartOffset(),
+ abvsFileNode.getLength());
+ sb.addItem(nodep);
+ }
}
sb.finish();
result.set(abvs);