A woman with a hat operates a machine on the wood railing.
A woman is operating machinary wearing a hat.
Operating machinery is a rephrasing of operates a machine. If she is a woman "with a hat" it follows that she is wearing a hat.
(-x)
(-x)