  For any family of principal bundles with a reductive structure group G on a
family X/S of smooth projective varieties in characteristic zero, it is known
that the parameter scheme S has a set theoretic stratification by locally
closed subsets which correspond to the Harder-Narasimhan types of the
restriction of the principal bundle to the various fibers of X/S. We show that
each of these subsets has in fact the structure of a locally closed subscheme
of the parameter scheme S, with the following universal property: Under any
base change, the pullback family admits a relative Harder-Narasimhan filtration
(defined appropriately) with a given Harder-Narasimhan type if and only if the
base change factors via the schematic stratum corresponding to that
Harder-Narasimhan type. It follows that principal bundles of any given
Harder-Narasimhan type on X/S form an Artin algebraic stack over S, and as the
Harder-Narasimhan type varies, these stacks define a stratification the stack
of all principal G-bundles on X/S by locally closed substacks.
  This result extends to principal bundles in higher dimensions our earlier
similar results which were proved for principal bundles on families of curves.
The result is new even for vector bundles, that is, for G = GL(n).
