Remove local cast alias
diff --git a/lib/dom.dart b/lib/dom.dart
index 2f2496d..8e0ea0b 100644
--- a/lib/dom.dart
+++ b/lib/dom.dart
@@ -58,12 +58,11 @@
   int compareTo(Object other) {
     // Not sure about this sort order
     if (other is! AttributeName) return 1;
-    final otherAttributeName = other;
-    var cmp = (prefix ?? '').compareTo((otherAttributeName.prefix ?? ''));
+    var cmp = (prefix ?? '').compareTo((other.prefix ?? ''));
     if (cmp != 0) return cmp;
-    cmp = name.compareTo(otherAttributeName.name);
+    cmp = name.compareTo(other.name);
     if (cmp != 0) return cmp;
-    return namespace.compareTo(otherAttributeName.namespace);
+    return namespace.compareTo(other.namespace);
   }
 
   @override