code: private ComparisonState compareElementAttributes(final Element control,
                                                       final XPathContext controlContext,
                                                       final Element test,
                                                       final XPathContext testContext) {
          final Attributes controlAttributes = splitAttributes(control.getAttributes());
          controlContext
              .addAttributes(Linqy.map(controlAttributes.remainingAttributes,
                                       QNAME_MAPPER));
          final Attributes testAttributes = splitAttributes(test.getAttributes());
          testContext
              .addAttributes(Linqy.map(testAttributes.remainingAttributes,
                                       QNAME_MAPPER));
  
          return compare(new Comparison(ComparisonType.ELEMENT_NUM_ATTRIBUTES,
                                        control, getXPath(controlContext),
                                        controlAttributes.remainingAttributes.size(), getParentXPath(controlContext),
                                        test, getXPath(testContext),
                                        testAttributes.remainingAttributes.size(), getParentXPath(testContext)))
              .andThen(new DeferredComparison() {
                      @Override
                      public ComparisonState apply() {
                          return compareXsiType(controlAttributes.type, controlContext,
                                                testAttributes.type, testContext);
                      }
                  })
              .andThen(new Comparison(ComparisonType.SCHEMA_LOCATION,
                                      control, getXPath(controlContext),
                                      controlAttributes.schemaLocation != null
                                      ? controlAttributes.schemaLocation.getValue() : null, getParentXPath(controlContext),
                                      test, getXPath(testContext),
                                      testAttributes.schemaLocation != null
                                      ? testAttributes.schemaLocation.getValue() : null, getParentXPath(testContext)))
              .andThen(new Comparison(ComparisonType.NO_NAMESPACE_SCHEMA_LOCATION,
                                      control, getXPath(controlContext),
                                      controlAttributes.noNamespaceSchemaLocation != null ?
                                      controlAttributes.noNamespaceSchemaLocation.getValue()
                                      : null, getParentXPath(controlContext),
                                      test, getXPath(testContext),
                                      testAttributes.noNamespaceSchemaLocation != null
                                      ? testAttributes.noNamespaceSchemaLocation.getValue()
                                      : null, getParentXPath(testContext)))
              .andThen(new NormalAttributeComparer(control, controlContext,
                                                   controlAttributes, test,
                                                   testContext, testAttributes));
      }
docs: Compares element's attributes.