Restricted Direct Products in Koch's Number Theory

On p.353 of Number Theory: Algebraic Numbers and Functions by Helmut Koch, he considers a group $G$ which is the restricted direct product of the locally compact abelian groups $G_i$ with respect to subgroups $H_i$ for $i \in I$, some index set. He considers a compact subset $T$ of the form $\prod_{i \notin S} H_i \times \prod_{i \in S} T_i$ where $T_i$ is a compact subset of $G_i$ for $i \in S$, and he consider a function $f$ supported on $T$.

He then writes: "For each $i \in I$ for which $H_i$ is defined we select that Haar measure on $H_i$ with $\int_{H_i} d \xi_i = 1$...On the compact group $G^S = \prod_{i \notin S} H_i$ we take the Haar measure $d \xi_S$ with $\int_{G^S} d\xi_S = 1$ and on $\prod_{i \in S} G_i$ the product measure $\prod_{i \in S} d\xi_i$. Then by $$\int_G f(\xi) d\xi = \int_{G^S} f(\xi_S) d\xi_S \times \prod_{i \in S} \int_{G_i} f(\xi_i) d\xi_i,$$ where $\xi_S$, respectively $\xi_i$, denotes the projection of $G$ onto $G^S$, respectively $G_i$, the Haar measure on $G$ is determined uniquely and independently of the choice of $S$. We denote it by $\prod_{i \in I} d\xi_i$.

I don't understand where the equality of the integrals is from. This works if $f$ is a product of functions on each of the $G_i$, just like in $\mathbb{R}^n$ if $f(x,y,z)=g(x)h(y)j(z)$, for example. But Fubini's theorem involves multiple steps of integration, so I don't understand where this comes from.

-
Such "restricted direct products" are colimits of the subgroups $G_S$ where all but the factors in $S$ are in the subgroups $H_i$. The topology on the colimit is uniquely determined, and for $f$ to be continuous requires that for some $S$ it be expressible as characteristic function of $G^S$ times continuous function on $\prod_{i\in S} G_i$. This reduces the issue to a more down-to-earth characterization of Haar measure on a finite product of topological groups. Probably Urysohn's lemma suffices to show that finite linear combinations of "monomial" functions are dense, in that case.