The Laws for once answer your question word for word. They quite clearly state that the referee: "stops play if a player is seriously injured".If a player appears to be seriously injured (but NOT head injury) and laying in the floor. Can play be stopped whilst the ball is in play? If so can it be stopped whilst the opposing team has a potential attack? Or must it be stopped after the attack has finished?
Exactly, often you'll see players down holding their heads, when they actually get treatment, it's for an ankle injury...It's difficult as unfortunately more and more players are going down faking serious injury only to pop straight back up again once you've stopped play. But you don't really have an option, and having a better idea of whether a player is seriously injured or not will come from experience. Reaction of team mate often helps as they will know what he is like and react accordingly. But all you can really do is stop play if there is any doubt it is serious.
The one time you ignore it though it'll be a serious injury.
How would you stop the play how many times would you blow the whistle if the ball is in play?If someone appears to be seriously injured stop play wherever the ball is and get them treatment.
There's nothing in the laws about waiting for an attack to end before stopping play in any instance