Learn English – the function of “doing” in “when doing something”

gerundsgrammarparts-of-speechpresent-participlessyntactic-analysis

Can anyone please explain if "doing" in "When doing something" is a base+ing verbal, or a present participle used as a verb in an elliptical sentence, or something else entirely.
Here's an example of a sentence:

"When training, athletes build their endurance by practising their
sports for long, exhausting hours."

And if it indeed is a part of an elliptical sentence, why is that so, and how is that different from this:

"Last weekend, I saw lots of ducks splashing around in the pond."

I understand that in this sentence splashing is a base+ing verbal, functioning as a modifier in a noun phrase.

Best Answer

"When training, athletes build their endurance by practising their sports for long, exhausting hours."

I would say it is a present participle.

Training, athletes build their endurance... This is one of usages for the participle. In your case, to clearly indicate the relationship between the participle "training" and the main sentence "athletes build...", "when" is added.

https://owl.english.purdue.edu/owl/resource/627/02/ The usage is shown in this URL

http://www.ego4u.com/en/cram-up/grammar/participles/exercises?13 Some of them use a conjunction with a participle as your example uses "when"