There are several different kinds of attention, some of which tend to be impaired in kids with Aspergers. In particular, there are often problems with shifting attention, the ability to shift attention in a flexible way from one subject to another. Aspergers kids may engage in over-focused, repetitive play for lengthy periods of time, under-reacting to distractions in the environment... These observations suggest good sustained attention, but deficient flexibility in shifting attention. There is a distinction between active and passive (distractibility from outside) attention. In autism spectrum disorder, the problem tends to be more one of active attention. Aspergers kids are not interested in directing their attention to outside stimuli... They follow their own ideas, which are mostly far removed from ordinary concerns, and do not like to be distracted from their thoughts.
A related matter is that of relevance, the ability to judge where it is important to focus one's attention. Aspergers kids are unable to calculate what is relevant in the normal way, hence the observation that the focus of their attention seems peculiar. Thus, one could say they often cannot see the forest for the trees.
Unfortunately, it is not uncommon for students with Aspergers to have considerable difficulty with schoolwork and homework, because of their attentional problems. This difficulty often exists despite superior intelligence. In one striking example, John, a fifteen year old with Aspergers, had an I.Q. in the superior range, but was failing almost all of his high school subjects. His difficulties were not due to a lack of effort on his part. Unfortunately, almost every time he sat down to study or write, he became flooded with his own rather unique thoughts.