I am not accusing them of anything. I am stating a fact: slogans like "Madrid ens roba" (Madrid steals from us) were central to the political campaign in favour of independence. I could also link you to interviews of representatives of all catalonian parties were they make xenophobic statements. This is specially notorious against Andalucia (which happens to be one of the poorest regions of Spain, and many andalusians emigrated to Catalonia to become part of their workforce in the 70s)
Spain is (in practice, not in theory) a very asymmetric federation of states. Catalonia has its own police, prison system, education, healthcare and a big long list. What it does , it's not control over its budget. The threat of independentism has been used as leverage against the government for decades. When the catalonian government was investigated for corruption, they party in power (until that moment, unionist) became the "Leader" of independentism.
Spanish central government is not free of blame (quite the opposite). First, it has always:
a) Caved to the demands of catalonian politicians in exchange for their support for the central government
b) Attacked catalonians as a way of winning votes against the most conservative voters.
This was all theater, as all parties in power were extremely similar. Now the situation has spinned out of control by a series of different factors:
- Disenchantment with the corrupt central government (though the catalonian wasn't better)
- Very biased education about the history of Catalonia
- Catalonian conservatives using it as a smokescreen to hide corruption.
- Left wing parties not minding this (as independence seems to be an issue above everything else)