code: ComparisonState compareNodes(final Node control, final XPathContext controlContext,
                                   final Node test, final XPathContext testContext) {
          final Iterable<Node> controlChildren =
              Linqy.filter(new IterableNodeList(control.getChildNodes()),
                           getNodeFilter());
          final Iterable<Node> testChildren =
              Linqy.filter(new IterableNodeList(test.getChildNodes()),
                           getNodeFilter());
  
          return compare(new Comparison(ComparisonType.NODE_TYPE,
                                        control, getXPath(controlContext),
                                        control.getNodeType(), getParentXPath(controlContext),
                                        test, getXPath(testContext),
                                        test.getNodeType(), getParentXPath(testContext)))
              .andThen(new Comparison(ComparisonType.NAMESPACE_URI,
                                      control, getXPath(controlContext),
                                      control.getNamespaceURI(), getParentXPath(controlContext),
                                      test, getXPath(testContext),
                                      test.getNamespaceURI(), getParentXPath(testContext)))
              .andThen(new Comparison(ComparisonType.NAMESPACE_PREFIX,
                                      control, getXPath(controlContext),
                                      control.getPrefix(), getParentXPath(controlContext),
                                      test, getXPath(testContext),
                                      test.getPrefix(), getParentXPath(testContext)))
              .andIfTrueThen(control.getNodeType() != Node.ATTRIBUTE_NODE,
                             new Comparison(ComparisonType.CHILD_NODELIST_LENGTH,
                                            control, getXPath(controlContext),
                                            Linqy.count(controlChildren), getParentXPath(controlContext),
                                            test, getXPath(testContext),
                                            Linqy.count(testChildren), getParentXPath(testContext)))
              .andThen(new DeferredComparison() {
                      @Override
                      public ComparisonState apply() {
                          return nodeTypeSpecificComparison(control, controlContext,
                                                            test, testContext);
                      }
                  })
              // and finally recurse into children
              .andIfTrueThen(control.getNodeType() != Node.ATTRIBUTE_NODE,
                             compareChildren(controlContext,
                                             controlChildren,
                                             testContext,
                                             testChildren));
      }
docs: Recursively compares two XML nodes.
  
  <p>Performs comparisons common to all node types, then performs
  the node type specific comparisons and finally recurses into
  the node's child lists.</p>
  
  <p>Stops as soon as any comparison returns
  ComparisonResult.CRITICAL.</p>
  
  <p>package private to support tests.</p>