rdftemplate

Library for generating XML documents from RDF data using templates
git clone https://code.djc.id.au/git/rdftemplate/
commit 52917a635cf960a2ae18810b0026c296f5834c88
parent 9e3a03f1086fb70869d403933938d77e30bc52fc
Author: Dan Callaghan <djc@djc.id.au>
Date:   Sun, 11 Oct 2009 16:34:07 +1000

need to filter before sorting, as the sort selector may only be applicable to
nodes which pass the predicate

Diffstat:
Msrc/main/java/au/com/miskinhill/rdftemplate/selector/Traversal.java | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/main/java/au/com/miskinhill/rdftemplate/selector/Traversal.java b/src/main/java/au/com/miskinhill/rdftemplate/selector/Traversal.java
@@ -45,9 +45,9 @@ public class Traversal {
                 destinations.add(it.nextResource());
             }
         }
+        CollectionUtils.filter(destinations, predicate);
         if (_sortComparator != null)
             Collections.sort(destinations, reverseSorted ? Collections.reverseOrder(_sortComparator) : _sortComparator);
-        CollectionUtils.filter(destinations, predicate);
         if (subscript != null) {
             if (destinations.size() <= subscript) {
                 throw new SelectorEvaluationException("Cannot apply subscript " + subscript + " to nodes " + destinations);