When an air elemental goes whirlwind and traps someone inside it, how do ranged attacks targeted at the trapped creature work? Can I target the creature? Does it have total concealment, as the air elemental is all around it?
I do not know enough about 3.5, so my answer will only address Pathfinder.
An invisible vertical curtain of wind appears. It is 2 feet thick and of considerable strength. It is a roaring blast sufficient to blow away any bird smaller than an eagle, or tear papers and similar materials from unsuspecting hands. (A Reflex save allows a creature to maintain its grasp on an object.) Tiny and Small flying creatures cannot pass through the barrier. Loose materials and cloth garments fly upward when caught in a wind wall. Arrows and bolts are deflected upward and miss, while any other normal ranged weapon passing through the wall has a 30% miss chance. (A giant-thrown boulder, a siege engine projectile, and other massive ranged weapons are not affected.) Gases, most gaseous breath weapons, and creatures in gaseous form cannot pass through the wall (although it is no barrier to incorporeal creatures).
I would rule – as per the table for the effects of wind on p. 95 of the Dungeon Master's Guide (d20SRD) – that ranged attacks would be impossible in that situation.
On d20 SRD's listing for Air Elementals, it says
Creatures caught in the whirlwind can otherwise act normally, but must succeed on a Concentration check (DC 15 + spell level) to cast a spell. Creatures caught in the whirlwind take a -4 penalty to Dexterity and a -2 penalty on attack rolls. The elemental can have only as many creatures trapped inside the whirlwind at one time as will fit inside the whirlwind’s volume.
The catch with attacking an Air Elemental is also using a weapon that can cut/smash/pierce air and actually hurt it.