The principles applied in sections 861 through 863 and section 865 and the regulations thereunder for determining the gross and the taxable income from sources within and without the United States shall generally be applied in determining the gross and the taxable income from sources within and without a particular foreign country when such a determination must be made under any provision of Subtitle A of the Internal Revenue Code, including section 952(a)(5). This section shall not apply, however, to the extent it is determined by applying § 1.863-3 that a portion of the taxable income is from sources within the United States and the balance of the taxable income is from sources within a foreign country. In the application of this section, the name of the particular foreign country shall be used instead of the term United States, and the term domestic shall be construed to mean created or organized in such foreign country. In applying section 861 and the regulations thereunder for purposes of this section, references to sections 243 and 245 shall be excluded, and the exception in section 861(a)(3) shall not apply. In the case of any item of income, the income from sources within a foreign country shall not exceed the amount which, by applying any provision of sections 861 through 863 and section 865 and the regulations thereunder without reference to this section, is treated as income from sources without the United States. See § 1.937-2T for rules for determining income from sources within a possession of the United States.
26 C.F.R. §1.863-6