theory? well x-max is total maximum movement(from a new sub) all will depend on how you tune the enclosure and the motor controll it will have, but plain an simple, more X-MECH is going to move more air for a given cone area, being allowed to do so. generally, the more x-mech, the lower the fs may be. the reason i am accentuating "x-mech" is that you can see x-max all over, usually having an x-mech 2x what the x-max is (x-max is the movement from dead rest to max excursion, where x-mech is total movement peak-to-peak) sometimes, you will find a sub sneak a deceptive x-max, where you will have as much as 3-4x as much forward movement from rest as bottoming movement. many times i've seen something like "15mmx-max, 21mm x-mech" also, make sure that the x-max, is not actually representing x-mech. i am actually seeing that more common nowadays. it's one cheat to sell you on the better sounding figure. for instance, sub "a" has an x-max of 17mm, and sub "b" has an x-max of 22.... while 22 does sound alot better than 17, manufacturer "a" advertises correct x-max, and manufacturer "b" is representing x-mech, usually with a astrix, or foot-note of "p-p", and the real comparison is 34mm vs 22mm. now, there are also more factors. lloking at the qts, bl, and other parameters may allow you to push the 2 subs in different ways, and the lower x-max sub might be able to be run harder in a restricted enclosure option, where the larger movement could simply allow you to gain a little efficiency off a lower power level without exceeding the suspension limits
xmech is not peak to peak, it is also (suppose to be) measured one-way. xmech is the maximum movement allowed mechanically (hence the 'mech'). As RAM said, xmax is (usually) derived from 70% BL. xmech ignores BL (or distortion output), and simply describes how far the sub can move (one-way) without the coil bottoming out against the backplate (in a motor limited design) or the suspension bottoming against the cone or frame, or the spiders/surround tearing (suspension limited design). In some cases, cone strength also affects xmech. This is why you will often see something like xmax = 18mm and xmech = 22mm... the sub reaches 70% BL before the suspension or motor bottoms out. Most designers do this intentionally to avoid users damaging the speaker before realizing they are getting close to its failure point. Its easier to bottom a sub out and damage it if it doesn't display any audible distortion before reaching this point.
xmax is also sometimes derived from a simple equation by measuring the coil length and subtracting the height of the gap/2. Divide by 2 because it is one-way. This is a (slightly) less accurate way to measure xmax, as you really dont know if this will be a 70% BL point or not, but it is a much easier way to measure xmax, and so usually smaller companies with less testing equipment use this method instead of actually measuring BL (with a DUMAX machine).
Sometimes xmag is greater than xmech (rarely), so its also correct to say that xmax is simply which ever spec is less, xmag or xmech.
xmag = 70% BL ("mag" refers to magnetic potential, which is what creates BL)
xmech = maximum physical excursion potential of the speaker ("mech" refers to mechanical movement potential, which is limited by the things I mentioned previously)
In a sealed enclosure application, xmax is very important, because cone excursion is the only thing that factors into the amount of air moved. In vented setups, xmax is less important because the enclosure's vent and tuning also affects total air displacement. For example, when playing a note at or very near enclosure tuning, cone excursion is minimized, but enclosure efficiency is maximized, so obviously how far the cone can move linearly is not as important as in the sealed system where only cone movement affects air displaced. In a vented system, other factors such as heat dissipation become more important, because again at or near tuning you have peak output, but minimized excursion (and thus, minimized cooling capabilities).
Even in vented system, xmax is important however. For one reason, when playing music, your sub is not always playing at or near tuning, so excursion is not always minimized. Dip below tuning where the sub unloads, or play higher freqs well above enclosure tuning, and cone excursion becomes more and more important.
xmech is most important in SPL situations, where the sub is burped at one, and only one, frequency. SPL competitors do not care if their sub is distorting when burping, so the loss of BL (and thus the loss of cone control which leads to distortion) is of little importance. At that point, its basically just an air pump. xmech is important to an SPL competitor because they dont want their sub(s) to bottom out and become damaged while burping. Ideally, an SPL setup will burp the sub, with excursion reaching something just less than xmech. At that point, the sub/enclosure combo is displaying its maximum air displacement potential. That is where power handling/cooling capability comes into play, as most setups will melt the coil from passing that much current through the coil, before the sub reaches xmech (again because they are burping at or near tuning where excursion is minimized by the enclosure).
xmax is just like any other t/s spec, when looked at in a vacuum, it is/can be misleading. Never focus on just one spec, such as xmech, xmax, power handling, etc and expect to derive very useful conclusions about the speaker's performance.