Territorial tax regime and worldwide tax regime- can someone confirm my understanding?

Can someone confirm that I am understanding the difference between the two.

  1. Territorial tax regime- I am a Canadian living in Japan. I will be taxed on any income that is generated within the border of Japan. So does it mean that I will be taxed only in Japanese investments at the Japan’s tax rate, whatever that tax rate will be for dividends, capital gains etc?

  2. Worldwide - I am an American living in Spain and holding investments in several countries. In this case, I will be taxed on any income that I am earning from several worldwide investments and I will be paying the US tax rate? Is this correct