For a smooth foliated manifold $(M,\mathcal F)$, the basic
and the foliated cohomologies are defined by using the de Rham
complex of $M$. These cohomologies are related with the
cohomology of the manifold by the de Rham spectral sequence of
$\mathcal F$. A foliated manifold is an example of a space
with two topologies, one coarser than the other. For these
spaces one can define a continuous cohomology that, for a
foliated manifold, corresponds to the continuous foliated (or
leafwise) cohomology. In this paper we introduce a
construction for spaces with two topologies based upon the
Alexander-Spanier continuous cochains. It allows us to define
a spectral sequence, similar to the de Rham spectral sequence
for a foliation. In particular, continuous basic and foliated
cohomologies are defined and related with the cohomology of
the space. For a smooth foliated manifold, we also consider
Alexander-Spanier differentiable cochains. We compare the
continuous and differentiable cohomologies, and the latter
with the de Rham cohomology. We prove that all three spectral
sequences are isomorphic from $E_2$ onwards if $\mathcal
F\/$ is a Riemannian foliation. As a consequence, we conclude
that this spectral sequence is a topological invariant of the
Riemannian foliation. We also compute some examples. In
particular, we give an isomorphism between the $E_2$ term
for a $G$-Lie foliation and the reduced cohomology of
$G$ (in the sense of S.-T. Hu) with coefficients in the
reduced foliated cohomology of $\mathcal F$.