  For a large class of gauge theories a nilpotent BRS-operator $s$ is
constructed and its cohomology in the space of local functionals of the
off-shell fields is shown to be isomorphic to the cohomology of $\4s=s+d$ on
functions $f(\4C,\PH)$ of tensor fields $\PH$ and of variables $\4C$ which are
constructed of the ghosts and the connection forms. The result allows general
statements about the structure of invariant classical actions and anomaly
candidates whose BRS-variation vanishes off-shell. The assumptions under which
the result holds are thoroughly discussed.
