My interpretation of p.65 is that if a spellcaster begins a combat round adjacent to a melee combatant then they should not even attempt casting.
"Spells cannot be cast while violently moving -- such as running, dodging a blow, or even walking normally."
To get your normal AC during melee you must be actively dodging and parrying, since this activity is an assumed part of melee and justifies the low number of "real attacks" per round. On the other hand, even a one-segment spell requires the caster to adopt a position of stillness and concentration to get in the proper frame of mind before releasing the spell. If a PC tried to do this next to a hostile combatant, then I would give the latter a free attack at +4 to hit (no Dex but active magical defenses might apply) -- similar to striking a motionless opponent. I would give that free attack regardless of who won initiative. Attempting to cast a spell is these conditions is an act of desperation!
So the sword vs spell question normally only comes up in play if an enemy unexpectedly charges the spellcaster on a round where they announce they are casting a spell, and I consider that the only condition worth tracking is whether the enemy reaches the caster during the casting interval. If we add weapon speed to the initiative on top of that (+5-7 segments for a typical one-handed weapon) then the fighter would almost never make their attack in time. Weapon speeds (typically 5-10 for the weapon in hand) are not really on the same scale as casting times (typically 1-5 for common cleric and MU spells).
Is it RAW? I think it is as close to RAW as any other interpretation, regardless of GG's Dragon article and convoluted examples given.
I think you are missing some big points on the page 65's SPELL CASTING DURING MELEE section and page 70's motionless opponent rules.
"It can thus be understood that spell casting during a melee can be a tricky business, for a mere shove at any time can spoil the dweomer! Any spell can be attempted, but success is likely to be uncertain.
Use the following procedure for spells cast during melee:"
"4. The spell caster cannot use his or her dexterity bonus to avoid being hit during spell casting; doing so interrupts the spell."
This seems to be the mechanical implementation of "Thus, casting a spell requires that a figure be relatively motionless and concentrating on the effort during the entire course of uninterrupted casting" It does not the seem the same as the helpless opponents situation on page 70 which grants an extra attack sequence in an applicable round.
There might be an argument in the RAW for the motionless opponent special circumstances to apply though to the relatively motionless caster, but since that imposes more penalties, it seems more RAW to use the specifically specified penalized for the only "relatively" motionless action. It could have said in 4 that the caster is motionless (with a reference to the special attacks rules for motionless opponents, or spelled out all the motionless opponent considerations), but it specifically states just losing dex as the procedure to apply for spells cast during melee.
From page 70:
Special Types Of Attacks:
Flank Attacks: All flank attacks negate any defender armor class addition for shield. Attacks against a rear flank, where the opponent is virtually unable to view the attackers, negate dexterity armor class bonus.
Rear Attacks: Opponents attacking from the rear gain a +2 to hit,
negate any consideration for shield, and also negate any consideration for dexterity.
Stunned, Prone or
Motionless Opponents: Treat all such opponents as if being attacked from the rear, but in this case the “to hit” bonus is +4 rather than +2.
Magically Sleeping or Held Opponents: If a general melee is in progress, and the attacker is subject to enemy actions, then these opponents are
automatically struck by any attack to which they would normally be subject, and the
maximum damage possible according to the weapon type is inflicted each time such an opponent is so attacked. The
number of attacks or attack routines possible against such an opponent
is twice the number normally allowed in a round. Otherwise, such opponents may be automatically slain, or bound as appropriate to materials at hand and size, at a rate of one per round. Note that this does not include normally sleeping opponents (see ASSASSINS’ TABLE FOR ASSASSINATIONS).