  In this paper, the generic part of the gauge theory of gravity is derived,
based merely on the action principle and on the general principle of
relativity. We apply the canonical transformation framework to formulate
geometrodynamics as a gauge theory. The starting point of our paper is
constituted by the general De~Donder-Weyl Hamiltonian of a system of scalar and
vector fields, which is supposed to be form-invariant under (global) Lorentz
transformations. Following the reasoning of gauge theories, the corresponding
locally form-invariant system is worked out by means of canonical
transformations. The canonical transformation approach ensures by construction
that the form of the action functional is maintained. We thus encounter amended
Hamiltonian systems which are form-invariant under arbitrary spacetime
transformations. This amended system complies with the general principle of
relativity and describes both, the dynamics of the given physical system's
fields and their coupling to those quantities which describe the dynamics of
the spacetime geometry. In this way, it is unambiguously determined how spin-0
and spin-1 fields couple to the dynamics of spacetime.
  A term that describes the dynamics of the free gauge fields must finally be
added to the amended Hamiltonian, as common to all gauge theories, to allow for
a dynamic spacetime geometry. The choice of this "dynamics Hamiltonian" is
outside of the scope of gauge theory as presented in this paper. It accounts
for the remaining indefiniteness of any gauge theory of gravity and must be
chosen "by hand" on the basis of physical reasoning. The final Hamiltonian of
the gauge theory of gravity is shown to be at least quadratic in the conjugate
momenta of the gauge fields -- this is beyond the Einstein-Hilbert theory of
General Relativity.
