So what?
The whole point is that they don't want to be a part of Spain, i.e. Spanish law can go **** itself.
And with regards to international law, well I find it silly if someone thinks "international" law says area x of country y cannot leave y. Sure, countries can refuse to accept the existence of Catalonia as a country, but that won't stop them being independent of Spain, as well as being silly. The "West" loves democracy doesn't it, so if the region wants to do something and does it democratically, suddenly that has no meaning?