let me do an incredibly cursory survey/evaluation of nationalism. one origin is the reformation, as religious leaders made use of political leaders/aristocracy to try to resist catholic power. or, for example, henry viii's assertion of sovereignty. the settlement of european borders at the peace of westphalia, 1648, establishing a principle of sovereignty was a turning point. the unification of germany into a political unit out of sort of feudal fiefs took another couple of hundred years, and the argument that resulted in it is the model of nationalism: the assertion of an "identity" based above all on language, but also folklore, arts, "values" and so on: mapping the political onto the "cultural": really a discovery or a manufacture of the nationalistic idea.
key to the making of such identities, or indiscernible from it, of course, is exclusion and a valuing of one's own culture above others. another site of this development is the forging of american colonies/states into a single nation: describing a liberty-loving national character across the seaboard etc.
the modern state arises together with nationalism: hence the expression "nation-state." state power makes use of and also forges, creates, re-emphasizes national identities: an essential ground of its legitimacy. the nation as cultural/linguistic/aesthetic identity and the state as a concentration of power in certain hands are mutually parasitic since westphalia at latest.
german nationalism is the paradigm, and in relation to state power it was a human disaster of unprecedented scale, a disgusting chauvinist totalitarian mess. in other cases the results have been more benign.
in making an assessment i will remind you that nationalism without militaristic state power is relatively impotent. national identities are of course "social constructions," not natural facts, but they are also not mere inventions of state power: language and other factors yield genuine human unifications. but they are expanded and emphasized and militarized by state power, and wielded/reinforced/forged explicitly as educational/propaganda strategies.
it's hard to evaluate whether this idea is actually dissolving; whether we are actually entering into a post-national or internationalist phase is, at least to me, a question, not some inevitable progression. yes and no. cosmopolitanism and species-brotherhood are groovy. but i'm always asking this: whose power is this consituting, whose power is using this, what forms of subordination are in store? this is what people should have been asking about nationalism in 1830. and one can't help feeling that one possibility is more complete subordination and hence more thorough human disaster even than was possible under nationalism: a world hierarchy and power-monopoly.
i'm no fan of nationalism overall, but nationalism, which once was about consolidation of power, is now a stage of localism. radical localism is of course my only actual prescription: constant reduction of the scope of anyone's coercion of others.