Quark dynamics in soft hadronic collisions and fragmentation on nuclear targets