  The relation between magnetic activity and rotation in late-type stars
provides fundamental information on stellar dynamos and angular momentum
evolution. Rotation/activity studies found in the literature suffer from
inhomogeneity in the measure of activity indexes and rotation periods. We
overcome this limitation with a study of the X-ray emitting late-type
main-sequence stars observed by XMM-Newton and Kepler. We measure rotation
periods from photometric variability in Kepler light curves. As activity
indicators, we adopt the X-ray luminosity, the number frequency of white-light
flares, the amplitude of the rotational photometric modulation, and the
standard deviation in the Kepler light curves. The search for X-ray flares in
the light curves provided by the EXTraS (Exploring the X-ray Transient and
variable Sky) FP-7 project allows us to identify simultaneous X-ray and
white-light flares. A careful selection of the X-ray sources in the Kepler
field yields 102 main-sequence stars with spectral types from A to M. We find
rotation periods for 74 X-ray emitting main-sequence stars, 22 of which without
period reported in the previous literature. In the X-ray activity/rotation
relation, we see evidence for the traditional distinction of a saturated and a
correlated part, the latter presenting a continuous decrease in activity
towards slower rotators. For the optical activity indicators the transition is
abrupt and located at a period of ~ 10 d but it can be probed only marginally
with this sample which is biased towards fast rotators due to the X-ray
selection. We observe 7 bona-fide X-ray flares with evidence for a white-light
counterpart in simultaneous Kepler data. We derive an X-ray flare frequency of
~ 0.15 d^{-1} , consistent with the optical flare frequency obtained from the
much longer Kepler time-series.
